/* Modern design tokens and base styles for default theme */

:root {
  /* Color tokens (fallbacks) */
  --brand-primary: #2b6cb0;
  --brand-secondary: #805ad5;
  --surface: #ffffff;
  --surface-muted: #fafafa;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --focus-ring-color: rgba(43, 108, 176, 0.35);

  /* Radius tokens */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Shadow tokens */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 18px 40px rgba(0,0,0,0.12);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;

  /* Typography scale */
  --font-xs: 12px;
  --font-sm: 14px;
  --font-md: 16px;
  --font-lg: 18px;
  --font-xl: 20px;
  --font-2xl: 24px;
}

/* Visually hidden, focusable (for skip links) */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Focus ring for interactive elements */
button:focus-visible,
.button:focus-visible,
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring-color);
  border-radius: var(--radius-sm);
}

/* Modern buttons that consume tokens */
.btn-modern {
  --btn-bg: var(--brand-primary);
  --btn-text: #fff;
  --btn-border: var(--brand-primary);
  --btn-bg-hover: color-mix(in srgb, var(--brand-primary) 90%, #000 10%);
  --btn-shadow: var(--shadow-sm);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: var(--font-sm);
  font-weight: 600;
  line-height: 1.2;
  box-shadow: var(--btn-shadow);
  transition: background-color .2s ease, box-shadow .2s ease, transform .05s ease;
}
.btn-modern:hover { background-color: var(--btn-bg-hover); }
.btn-modern:active { transform: translateY(1px); }

/* Override Bootstrap-like primary for consistency */
.btn-primary {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: color-mix(in srgb, var(--brand-primary) 90%, #000 10%) !important;
  border-color: color-mix(in srgb, var(--brand-primary) 90%, #000 10%) !important;
}

/* Secondary and outline variants */
.btn-secondary {
  background-color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
}
.btn-secondary:hover,
.btn-secondary:focus {
  background-color: color-mix(in srgb, var(--brand-secondary) 90%, #000 10%) !important;
  border-color: color-mix(in srgb, var(--brand-secondary) 90%, #000 10%) !important;
}
.btn-outline-primary {
  color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: #fff !important;
  background-color: var(--brand-primary) !important;
}
.btn-outline-secondary {
  color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: #fff !important;
  background-color: var(--brand-secondary) !important;
}

/* Card shell using tokens */
.card-modern {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-modern:hover { box-shadow: var(--shadow-md); }

/* Subtle typography defaults */
body {
  color: var(--text);
  font-size: var(--font-md);
}
.small, small { color: var(--text-muted); }

/* Forms modernization */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select, textarea {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border) !important;
  background-color: var(--surface) !important;
  color: var(--text) !important;
}
.form-control:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus, textarea:focus {
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px var(--focus-ring-color) !important;
  outline: none !important;
}
.is-invalid,
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #ef4444 !important; /* red-500 */
}
.invalid-feedback { display: block; font-size: var(--font-sm); }
.form-label { font-weight: 600; margin-bottom: 6px; }
.input-group .btn { border-radius: var(--radius-md); }
.subscribe-button {
  background: var(--brand-primary);
  color: #fff;
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius-md);
  padding: 10px 16px;
}
.subscribe-button:hover,
.subscribe-button:focus {
  background: color-mix(in srgb, var(--brand-primary) 90%, #000 10%);
}

/* Sticky navbar polish */
.fashion-navbar.navbar-sticky.is-stuck {
  box-shadow: var(--shadow-md);
  backdrop-filter: saturate(120%) blur(4px);
  transition: box-shadow .2s ease;
}
.fashion-navbar.navbar-sticky {
  z-index: 1040; /* keep header above content/menus */
  background: var(--surface);
}

/* Primary nav bar modern look */
.navbar-stuck-menu { background: var(--brand-primary); }
.navbar-stuck-menu .container { gap: 10px; }
.navbar-stuck-menu .navbar-nav { gap: 14px; }
.navbar-stuck-menu .nav-link { color: #fff; opacity: .95; }
.navbar-stuck-menu .nav-link:hover,
.navbar-stuck-menu .nav-link:focus { color: #fff; opacity: 1; text-decoration: none; }

/* Categories chip button */
.categories-chip > a.nav-link {
  background: #fff;
  color: var(--brand-primary) !important;
  border-radius: 12px;
  padding: 8px 14px !important;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.categories-chip > a.nav-link:hover { box-shadow: var(--shadow-md); }
.categories-chip .category-menu-toggle-btn-text { margin: 0; font-weight: 600; }
.categories-chip .dropdown-toggle::after { filter: none; }

/* Offers/vendor buttons inside blue bar */
.navbar-stuck-menu .btn.dropdown-toggle {
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
}
.navbar-stuck-menu .btn.dropdown-toggle:hover,
.navbar-stuck-menu .btn.dropdown-toggle:focus {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.35);
}

/* Dropdown animation for header menus (non-invasive: do not force hidden state) */
.dropdown-menu.fashion-dropdown,
.dropdown-menu.__dropdown-menu-2,
.dropdown-menu.__dropdown-menu-3,
.dropdown-menu.__dropdown-menu-sizing {
  transition: opacity .15s ease, transform .15s ease;
}
.dropdown-menu.show.fashion-dropdown,
.dropdown-menu.show.__dropdown-menu-2,
.dropdown-menu.show.__dropdown-menu-3,
.dropdown-menu.show.__dropdown-menu-sizing {
  opacity: 1;
  transform: translateY(0);
}

/* Modern Hero (fallback when no banner slider) */
.modern-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 10%, #fff 90%), #fff);
  padding: clamp(32px, 6vw, 80px) 0;
}
.modern-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
}
@media (max-width: 992px) {
  .modern-hero-grid { grid-template-columns: 1fr; }
}
.modern-hero-title {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.1;
  margin: 0 0 12px;
}
.modern-hero-subtitle {
  color: var(--text-muted);
  font-size: var(--font-lg);
  margin: 0 0 20px;
}
.modern-hero-cta .btn-modern { font-size: var(--font-md); padding: 12px 18px; }
.modern-hero-img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

/* Enhance existing hero overlay visuals */
.fashion-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.35));
  display: flex; align-items: flex-end; justify-content: flex-start;
}
.fashion-hero-content {
  color: #fff;
  padding: 24px clamp(16px, 4vw, 40px);
  max-width: min(90%, 720px);
}
.fashion-hero-title { font-size: clamp(22px, 4.5vw, 40px); margin-bottom: 8px; }
.fashion-hero-subtitle { opacity: .9; font-size: var(--font-lg); }
.fashion-hero-cta.btn-fashion, .fashion-hero-cta.btn-modern {
  margin-top: 14px;
}

/* Product cards modernization */
.product-card {
  position: relative;
  border-radius: var(--radius-lg);
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
  border: 1px solid var(--border);
  background: var(--surface);
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Image with consistent aspect ratio */
.product-card .pc-image { aspect-ratio: 4 / 5; width: 100%; overflow: hidden; background: var(--surface-muted); }
.product-card .pc-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Discount badge */
.product-card .badge-discount { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--brand-secondary); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: var(--font-xs); font-weight: 700; box-shadow: var(--shadow-sm); }

/* Action buttons (wishlist/quickview) */
.product-card .action-group { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; gap: 8px; }
.product-card .action-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.95); color: var(--text); border: 1px solid var(--border); border-radius: 50%; box-shadow: var(--shadow-sm); transition: background .15s ease, transform .1s ease; }
.product-card .action-btn:hover { background: #fff; transform: translateY(-1px); }

/* Hover overlay CTA */
.product-card .hover-cta { position: absolute; inset-inline: 10px; bottom: 10px; opacity: 0; transform: translateY(8px); transition: opacity .15s ease, transform .15s ease; }
.product-card:hover .hover-cta { opacity: 1; transform: translateY(0); }
.product-card .hover-cta .btn-modern { width: 100%; }

/* Price and title trim */
.product-card .title { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.product-card .price .original { color: var(--text-muted); }

/* Footer polish */
.footer-modern {
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.25), rgba(15, 23, 42, 0.95));
  color: #e2e8f0;
}
.footer-modern .footer-header {
  font-size: var(--font-md);
  color: #f8fafc;
  margin-bottom: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-modern .footer-links .widget-list-link,
.footer-modern .widget-list-link {
  color: #cbd5f5;
  text-decoration: none;
  transition: color .2s ease;
}
.footer-modern .footer-links .widget-list-link:hover,
.footer-modern .footer-links .widget-list-link:focus,
.footer-modern .widget-list-link:hover,
.footer-modern .widget-list-link:focus {
  color: #ffffff;
  text-decoration: none;
}
.footer-modern hr,
.footer-modern .address_under_line {
  border-color: rgba(148,163,184,0.25);
}
.footer-modern .subscribe-border {
  background: rgba(4, 12, 33, 0.7);
  border: 1px solid rgba(148,163,184,0.35);
  color: #f8fafc;
}
.footer-modern .subscribe-border::placeholder {
  color: rgba(226,232,240,0.65);
}
.footer-modern .subscribe-button {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  border-color: transparent;
  color: #031525;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
}
.footer-modern .subscribe-button:hover {
  filter: brightness(1.05);
}
.footer-modern .store-contents img {
  filter: drop-shadow(0 8px 20px rgba(2, 6, 23, 0.4));
}
.footer-modern .start_address .widget-list-link,
.footer-modern .start_address .widget-list-link span,
.footer-modern .start_address .widget-list-link i,
.footer-modern address {
  color: #e2e8f0;
}
.footer-modern .bg-white-overlay-50 {
  background: rgba(2, 8, 23, 0.9);
  border-top: 1px solid rgba(148,163,184,0.25);
}
.footer-modern .bg-white-overlay-50 a {
  color: #cbd5f5;
}
.footer-modern .bg-white-overlay-50 a:hover {
  color: #38bdf8;
}
.social-btn-modern {
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  background: rgba(255,255,255,0.08);
  transition: transform .15s ease, background .2s ease;
}
.social-btn-modern:hover {
  transform: translateY(-2px);
  background: rgba(248,250,252,0.18);
}
.social-btn-modern:focus-visible {
  box-shadow: 0 0 0 3px var(--focus-ring-color);
  outline: none;
}
.__inline-9 .footer-slider-container {
  background: rgba(6, 12, 31, 0.6);
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(8px);
}
.__inline-9 .footer-slide-item {
  background: rgba(2, 8, 23, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #f8fafc;
  box-shadow: var(--shadow-sm);
}
.__inline-9 .footer-slide-item p {
  color: #f8fafc;
}
.__inline-9 .footer-slide-item small {
  color: rgba(226,232,240,0.75);
}
.__inline-9 .footer-slide-item img {
  filter: drop-shadow(0 8px 16px rgba(15,23,42,0.45));
}

/* Product details gallery modernization */
.pd-gallery-main { aspect-ratio: 1 / 1; background: var(--surface-muted); border-radius: var(--radius-md); overflow: hidden; }
.pd-gallery-main img { object-fit: contain; width: 100%; height: 100%; }
.pd-thumb { border: 1px solid var(--border); border-radius: var(--radius-sm); width: 64px; height: 64px; overflow: hidden; background: var(--surface); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.active, .pd-thumb:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring-color); border-color: var(--brand-primary); }

/* Buttons alignment on details page */
.product-add-and-buy-section .btn { border-radius: var(--radius-md); }
.btn--primary { background-color: var(--brand-primary) !important; border-color: var(--brand-primary) !important; color: #fff !important; }
.btn--primary:hover, .btn--primary:focus { background-color: color-mix(in srgb, var(--brand-primary) 90%, #000 10%) !important; border-color: color-mix(in srgb, var(--brand-primary) 90%, #000 10%) !important; }
