/* ============================================================
   X Network Shop — shop.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #0c2b6f;
  --blue-mid:   #122e7a;
  --blue-dark:  #0b1b47;
  --green:      #00a74f;
  --amber:      #e8a000;
  --red:        #d63031;
  --text:       #0a0a0a;
  --text-muted: #5f6b76;
  --border:     #dfe6ef;
  --bg-light:   #f0f4fb;
  --bg-faint:   #f7f9fc;
  --white:      #ffffff;
  --radius:     10px;
  --shadow-sm:  0 2px 8px rgba(12,43,111,0.07);
  --shadow-md:  0 6px 20px rgba(12,43,111,0.11);
  --shadow-lg:  0 16px 40px rgba(12,43,111,0.18);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-faint);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: 'Archivo Black', sans-serif; line-height: 1.15; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(180deg, #fff 0%, #f8faff 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(12,43,111,0.06);
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { height: 116px; }
.logo-link { display: flex; align-items: center; }

.header-rule {
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-mid) 50%, var(--green) 100%);
}

.header-right { display: flex; align-items: center; gap: 10px; }

.btn-back-portal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.18s;
}

.btn-back-portal:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

.hdr-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--blue);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s;
}

.hdr-icon-btn:hover { background: var(--bg-light); border-color: rgba(12,43,111,0.3); }

.hdr-badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--white);
}

/* ── Container ───────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Hero ────────────────────────────────────────────────── */
.shop-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
  padding: 48px 0 44px;
  color: var(--white);
  margin-bottom: 0;
}

.hero-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
  margin-bottom: 8px;
}

.shop-hero h1 { font-size: 2.4rem; color: var(--white); margin-bottom: 10px; }
.hero-sub { color: rgba(255,255,255,0.72); font-size: 1rem; max-width: 500px; }

/* ── Filters ─────────────────────────────────────────────── */
.shop-filters {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 82px;
  z-index: 100;
}

.filters-inner {
  display: flex;
  gap: 4px;
  padding: 10px 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters-inner::-webkit-scrollbar { display: none; }

.filter-btn {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.filter-btn:hover { border-color: var(--blue); color: var(--blue); }

.filter-btn.active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

/* ── Shop body ───────────────────────────────────────────── */
.shop-body { padding: 36px 24px 64px; }

.product-section { margin-bottom: 48px; }
.product-section.hidden { display: none; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  color: var(--blue-dark);
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.section-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  margin-top: 0;
}

/* ── Qty stepper ─────────────────────────────────────────── */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1.5px solid var(--blue);
  background: var(--white);
  color: var(--blue);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: background 0.15s;
}

.qty-btn:hover { background: var(--bg-light); }

.qty-val {
  font-weight: 800;
  font-size: 0.95rem;
  min-width: 22px;
  text-align: center;
  color: var(--blue-dark);
}

/* ── Product grid ────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s;
  box-shadow: var(--shadow-sm);
}

.product-card:hover { box-shadow: var(--shadow-md); border-color: rgba(12,43,111,0.2); }

.product-card.featured {
  border-color: var(--blue);
  box-shadow: 0 4px 20px rgba(12,43,111,0.15);
}

.product-badge {
  position: absolute;
  top: -1px; right: 16px;
  background: var(--amber);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 0 0 8px 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-badge.gig { background: var(--blue); }

.product-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.product-icon.inet { background: rgba(12,43,111,0.08); color: var(--blue); }
.product-icon.voip { background: rgba(0,167,79,0.1);   color: var(--green); }
.product-icon.cam  { background: rgba(214,48,49,0.08); color: var(--red); }
.product-icon.eq   { background: rgba(232,160,0,0.12); color: var(--amber); }

.product-card h3 {
  font-size: 1.05rem;
  color: var(--blue-dark);
  margin-bottom: 2px;
}

.product-speed {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 14px;
}

.product-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 18px;
  flex: 1;
}

.product-features li {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.product-features li::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.product-price {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.2rem;
  color: var(--blue-dark);
}

.product-price .per { font-family: inherit; font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }

.btn-add-cart {
  padding: 8px 18px;
  border-radius: var(--radius);
  border: 2px solid var(--blue);
  background: var(--blue);
  color: var(--white);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-add-cart:hover { background: var(--blue-mid); border-color: var(--blue-mid); }

.btn-add-cart.added {
  background: var(--green);
  border-color: var(--green);
}

/* ── Cart drawer ─────────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,50,0.4);
  z-index: 400;
  backdrop-filter: blur(2px);
}

.cart-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 360px;
  background: var(--white);
  z-index: 401;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(12,43,111,0.18);
  animation: slideInRight 0.22s ease;
  padding-top: env(safe-area-inset-top);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.cart-panel-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-panel-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1rem;
  color: var(--blue-dark);
}

.cart-close-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: none; background: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}

.cart-close-btn:hover { background: var(--bg-light); }

.cart-items { flex: 1; overflow-y: auto; padding: 8px 0; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 2px;
}

.cart-item-price {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cart-item-remove {
  width: 26px; height: 26px;
  border-radius: 6px;
  border: none; background: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all 0.15s;
  flex-shrink: 0;
}

.cart-item-remove:hover { background: rgba(214,48,49,0.08); color: var(--red); }

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
  opacity: 0.6;
}

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--blue-dark);
}

.cart-total-val {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.1rem;
}

.cart-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.btn-checkout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  border-radius: var(--radius);
  border: none;
  background: var(--blue);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s;
}

.btn-checkout:hover { background: var(--blue-mid); }

/* ── Checkout modal ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,50,0.45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  backdrop-filter: blur(2px);
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-card h3 { font-size: 1.15rem; color: var(--blue-dark); margin-bottom: 4px; }

.checkout-field {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.checkout-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.checkout-field input {
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(12,43,111,0.09);
}

.checkout-field textarea {
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  resize: vertical;
}

.checkout-field input[type="number"] {
  max-width: 100px;
}

.modal-card-lg {
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Checkout sections */
.checkout-section {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

.checkout-section-title {
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
}

.radio-opt input { cursor: pointer; }

.checkbox-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.checkbox-opt input {
  margin-top: 3px;
  cursor: pointer;
}

.field-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-style: italic;
}

.sms-consent {
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.sms-consent a {
  color: var(--blue);
  text-decoration: underline;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid var(--blue);
  background: var(--white);
  color: var(--blue);
  white-space: nowrap;
}

.btn:hover { background: var(--blue); color: var(--white); }
.btn.dark  { background: var(--blue); color: var(--white); }
.btn.dark:hover { background: var(--blue-mid); border-color: var(--blue-mid); }

/* Success */
.support-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  text-align: center;
}

.support-success-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(0,167,79,0.12);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
}

.support-success h3 { color: var(--blue-dark); }
.support-success p  { color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }

/* ── Footer ──────────────────────────────────────────────── */
#site-footer {
  position: sticky;
  bottom: 0;
  z-index: 100;
  background: var(--blue);
  color: rgba(255,255,255,0.75);
  padding: 18px 0;
  margin-top: auto;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

#site-footer a { color: rgba(255,255,255,0.85); }
#site-footer a:hover { color: var(--white); text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { height: 90px; padding: 0 16px; }
  .logo { height: 72px; }
  .shop-hero h1 { font-size: 1.75rem; }
  .shop-body { padding: 24px 14px 48px; }
  .cart-panel { width: 100%; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .filters-inner { padding: 10px 14px; }
  .container { padding: 0 14px; }
  .modal-actions { flex-direction: column; }
  .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
}
