/* ============================================================
   header-footer.css — shared site chrome + modals
   ============================================================ */

/* ---------------- HEADER ---------------- */
.site-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  font-family: 'Poppins', var(--ffc);
}

/* Dark top bar */
.hdr-top {
  background: var(--dark-bar);
  color: #fff;
}
.hdr-top-inner {
  padding: 0 40px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hdr-sponsor {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
}
.hdr-sponsor .label { color: #d1d5db; }
.hdr-sponsor .sp-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}
.hdr-sponsor .sp-name img {
  width: 35px; height: 35px;
  border-radius: 50%;
  object-fit: contain;
  background: #f3f4f6;
  padding: 4px;
  border: 1px solid #d1d5db;
}
.hdr-sponsor .sp-name span { text-decoration: underline; }
.hdr-select-sponsor { text-decoration: underline; cursor: pointer; font-size: 0.875rem; }

.hdr-top-right {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.875rem;
  color: #d1d5db;
}
.hdr-country {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
}
.hdr-country img { width: 16px; height: 16px; border-radius: 2px; }
.hdr-lang { cursor: pointer; }
.hdr-signin { background: none; border: none; color: #d1d5db; cursor: pointer; font-size: 0.875rem; text-decoration: none; }
.hdr-signin:hover { color: #fff; }
.hdr-joinnow { background: #FE5000; border: 1px solid #FE5000; border-radius: 6px; color: #fff; cursor: pointer; font-size: 0.875rem; font-weight: 600; padding: 0.4rem 0.85rem; text-decoration: none; display: inline-flex; align-items: center; }
.hdr-joinnow:hover { background: #e04700; border-color: #e04700; }
.hdr-icon-btn { background: none; border: none; color: #fff; cursor: pointer; display: inline-flex; }

.hdr-mobile-toggle { display: none; }
.hdr-hamburger {
  background: none; border: none; color: #fff;
  font-size: 1.25rem; cursor: pointer;
}

/* White logo bar */
.hdr-main {
  width: 100%;
  background: #fbfbfb;
  border-bottom: 1px solid #e5e7eb;
}
.hdr-main-inner {
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hdr-logo img { width: 153px; cursor: pointer; display: block; }
.hdr-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}
.hdr-nav a {
  color: #374151;
  font-size: 24px;
  font-weight: 400;
  white-space: nowrap;
  transition: color 0.2s;
  cursor: pointer;
}
.hdr-nav a:hover,
.hdr-nav a.active { color: #000; }
.hdr-main-spacer { width: 96px; }

/* Nav dropdown (Products) */
.hdr-dropdown { position: relative; }
.hdr-drop-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hdr-drop-toggle svg { width: 18px; height: 18px; transition: transform 0.2s; }
.hdr-dropdown:hover .hdr-drop-toggle svg { transform: rotate(180deg); }
.hdr-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  margin-top: 10px;
  background: #fff;
  border: 1px solid #ededed;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.12);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
}
/* invisible bridge so the menu doesn't close in the gap */
.hdr-submenu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.hdr-dropdown:hover .hdr-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.hdr-submenu a {
  font-size: 18px;
  padding: 9px 22px;
  color: #374151;
}
.hdr-submenu a:hover,
.hdr-submenu a.active { color: #FE5000; background: #fbf3ef; }

/* Mobile menu panel */
.hdr-mobile-menu {
  display: none;
  background: var(--dark-bar);
  border-top: 1px solid #374151;
  padding: 16px;
  gap: 16px;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  font-size: 0.875rem;
}
.hdr-mobile-menu.open { display: flex; }
.hdr-mobile-menu button,
.hdr-mobile-menu a:not(.hdr-joinnow) { background: none; border: none; color: #d1d5db; cursor: pointer; }

@media (max-width: 767px) {
  .hdr-top-right { display: none; }
  .hdr-mobile-toggle { display: flex; align-items: center; gap: 10px; }
  .hdr-top-inner { padding: 0 16px; }
  .hdr-main-inner { flex-direction: column; height: auto; padding: 16px; gap: 16px; }
  .hdr-nav { gap: 24px; font-size: 1rem; }
  .hdr-nav a { font-size: 1rem; }
  .hdr-main-spacer { display: none; }
  .hdr-logo img { width: 140px; }
}

/* ---------------- FOOTER ---------------- */
.site-footer {
  width: 100%;
  background: #0a0a0a;
  color: #e5e7eb;
  font-size: 0.875rem;
  font-family: 'Poppins', var(--ffc);
}
.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 56px 80px 40px;
}
.footer-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 48px;
}
.footer-brand-col {
  max-width: 22rem;
}
.footer-logo img { width: 130px; }
.footer-tagline {
  margin: 24px 0 0;
  color: #e5e7eb;
  line-height: 1.7;
}
.footer-col-title {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
}
.footer-col-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-col-links li { color: #e5e7eb; }
.footer-col-links a { color: #e5e7eb; text-decoration: none; transition: color .2s; }
.footer-col-links a:hover { color: #fff; }
.footer-contact-email {
  margin: 0;
  color: #e5e7eb;
  font-size: 0.9375rem;
}
.footer-contact-email a { color: #e5e7eb; text-decoration: none; transition: color .2s; }
.footer-contact-email a:hover { color: #fff; }
.footer-divider {
  border: 0;
  border-top: 1px solid #2a2a2a;
  margin: 48px 0 24px;
}
.footer-copyright {
  margin: 0;
  text-align: center;
  color: #e5e7eb;
}

@media (max-width: 767px) {
  .footer-inner { padding: 40px 24px 32px; }
  .footer-row { flex-direction: column; gap: 32px; }
  .footer-brand-col { max-width: none; }
}

/* ---------------- MODALS ---------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(31, 41, 55, 0.7);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal {
  position: relative;
  background: #fff;
  color: #000;
  width: 100%;
  max-width: 400px;
  padding: 32px;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 13px; right: 11px;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 4px;
  padding: 2px;
  background: none;
  cursor: pointer;
  display: inline-flex;
  color: #111;
}
.modal-logo { display: flex; justify-content: center; margin: 8px 0 16px; }
.modal-logo img { width: 153px; }
.modal-title {
  font-family: var(--ffc);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}
.modal-desc strong { font-weight: 700; }
.modal-desc { font-family: 'Poppins', var(--ffc); font-size: 0.875rem; color: #374151; margin-bottom: 16px; }
.modal .field { margin-bottom: 16px; }
.modal .field input {
  width: 100%;
  border: 2px solid #a1a1aa;
  border-radius: 2px;
  padding: 14px 11px;
  font-size: 0.875rem;
  color: #000;
}
.modal .field input:focus { outline: 2px solid var(--color-primary); }
.modal .field-pw { position: relative; }
.modal .field-pw .eye {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%); cursor: pointer; color: #6b7280;
}
.modal .form-links {
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  margin: 14px 2px 0;
}
.modal .form-links span { color: var(--color-primary); font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--ff); }
.modal .w-full { width: 100%; }
.modal .mt-1 { margin-top: 8px; }
/* Modal CTAs use sentence case (not the global uppercase button style) */
.modal .btn, .sr-select { text-transform: none; font-size: 0.95rem; }

/* Field labels (returning customer) */
.modal .field-label { display: block; font-family: var(--ff); font-size: 0.8rem; font-weight: 600; color: #111; margin: 0 0 6px; }
.modal .field-label .req { color: #e11d48; margin-left: 1px; }
.rc-head { text-align: center; margin-bottom: 22px; }
.rc-title, .rc-sub { font-family: var(--ff); font-size: 1.05rem; font-weight: 700; color: #111; line-height: 1.35; }
.modal-note { line-height: 1.6; margin: 4px 0 0; color: #374151; }

/* Inline validation (returning-customer form) */
.modal .field-error { display: none; font-family: 'Poppins', var(--ffc); font-size: 0.72rem; color: #e11d48; margin: -10px 0 12px; }
.modal .field input.has-error { outline: 2px solid #e11d48; border-color: #e11d48; }

/* Post-auth success panel */
.rc-success { text-align: center; padding: 12px 4px 6px; }
.rc-check { width: 56px; height: 56px; color: var(--color-primary); margin: 0 auto 14px; display: block; }

/* Sponsor modal specifics */
.modal--wide { max-width: 520px; }
.sponsor-head {
  padding: 12px 20px;
  border-bottom: 1px solid var(--divider);
  font-family: var(--ffc);
  font-weight: 700;
  text-transform: uppercase;
}
.sponsor-body { padding: 16px 20px; display: flex; gap: 16px; }
.sponsor-body img {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: contain; background: #e5e7eb; padding: 4px; border: 1px solid #d1d5db;
}
.sponsor-body .s-name { font-weight: 700; }
.sponsor-body .s-loc { font-size: 0.875rem; color: #4b5563; margin-bottom: 8px; }
.sponsor-body .s-row { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: #1f2937; }
.aff-title { font-family: var(--ff); font-weight: 700; font-size: 0.95rem; color: #111; }
.sponsor-divider { border: none; border-top: 1px solid var(--divider); margin: 12px 0 18px; }
.sponsor-search-form { display: flex; flex-direction: column; gap: 14px; }
.sponsor-search-form .field { margin-bottom: 0; }
.sponsor-section-label {
  font-family: var(--ff);
  font-weight: 700;
  font-size: 0.85rem;
  color: #111;
  margin: 0;
}
.sponsor-or {
  text-align: center;
  color: #9ca3af;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sponsor-results { margin-top: 6px; }
.sponsor-result {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--divider);
}
.sponsor-result:first-child { border-top: 1px solid var(--divider); }
.sr-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: #e5e7eb; }
.sr-info { flex: 1; min-width: 0; }
.sr-name { font-family: var(--ff); font-weight: 700; font-size: 0.85rem; color: #111; line-height: 1.2; }
.sr-loc { font-family: var(--ff); font-size: 0.75rem; color: #6b7280; }
.sr-select { padding: 5px 18px; font-size: 0.8rem; border-radius: 4px; flex: none; }

/* Country selector modal */
.country-modal .modal { max-width: 370px; padding: 47px 26px 19px; text-align: center; border: 1px solid #000; }
.country-modal .c-logo { height: 46px; object-fit: cover; margin: 0 auto; }
.country-modal .c-label { font-family: var(--ffc); font-weight: 700; font-size: 0.875rem; text-align: left; margin: 37px 0 5px; }
.country-modal select {
  width: 100%; padding: 15px 21px; border: 1px solid #000; font-size: 0.9rem;
}

/* ---------------- CART DRAWER ---------------- */
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-left: 1px solid #000;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9998;
}
.cart-backdrop.open { display: block; }
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-bottom: 1px solid var(--divider-2);
  font-family: var(--ffc); font-weight: 700; text-transform: uppercase; font-size: 1.25rem;
}
.cart-head button { background: none; border: none; cursor: pointer; display: inline-flex; }
.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.cart-empty { color: #6b7280; text-align: center; margin-top: 40px; font-family: 'Poppins', var(--ffc); }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.cart-item img { width: 64px; height: 64px; object-fit: contain; }
.cart-item .ci-name { font-weight: 600; font-size: 0.95rem; }
.cart-item .ci-price { color: #000; font-weight: 700; font-size: 0.9rem; }
.cart-foot { padding: 20px; border-top: 1px solid var(--divider-2); }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 16px; }

/* Image zoom lightbox (shop) */
.zoom-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9999;
  align-items: center; justify-content: center;
  padding: 24px;
}
.zoom-overlay.open { display: flex; }
.zoom-overlay img { max-height: 90vh; border: 2px solid #fff; background: #fff; }
.zoom-overlay .modal-close { color: #fff; border-color: rgba(255,255,255,0.4); }

.icon-16 { width: 16px; height: 16px; }
.icon-20 { width: 20px; height: 20px; }
.icon-24 { width: 24px; height: 24px; }
