/* =============================================================
   FURNICAT DESIGN SYSTEM — Phase 3: Color Palette & Typography
   ============================================================= */

/* ── Custom properties: Light mode ────────────────────────────── */
:root {
  /* Brand accent — warm terracotta / clay */
  --fc-primary:          #C4714E;
  --fc-primary-rgb:      196, 113, 78;
  --fc-primary-hover:    #A85C3B;

  /* Brand secondary — deep walnut brown */
  --fc-secondary:        #6B4226;
  --fc-secondary-rgb:    107, 66, 38;
  --fc-secondary-hover:  #542F18;

  /* Warm neutral surfaces */
  --fc-bg:               #FAF7F4;   /* page background */
  --fc-surface:          #FFFFFF;   /* card / panel background */
  --fc-surface-warm:     #F5EEE8;   /* subtle warm card tint */

  /* Typography colours */
  --fc-text:             #2C1810;   /* primary body text — high contrast warm */
  --fc-text-muted:       #7A6055;   /* captions / secondary text */
  --fc-border:           #E8DDD6;   /* dividers & card borders */

  /* Fonts */
  --fc-font-heading:     'Playfair Display', Georgia, 'Times New Roman', serif;
  --fc-font-body:        'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Custom properties: Dark mode ─────────────────────────────── */
[data-bs-theme="dark"] {
  --fc-primary:          #D4856A;   /* lightened for dark bg readability */
  --fc-primary-rgb:      212, 133, 106;
  --fc-primary-hover:    #E09A82;

  --fc-secondary:        #A87D62;
  --fc-secondary-rgb:    168, 125, 98;
  --fc-secondary-hover:  #C4956E;

  --fc-bg:               #1C1410;   /* warm charcoal, not cold black */
  --fc-surface:          #2A1F1A;   /* card surface in dark mode */
  --fc-surface-warm:     #332520;

  --fc-text:             #F5EDE8;   /* warm off-white for readability */
  --fc-text-muted:       #B09888;
  --fc-border:           #3D2D25;
}

/* ── Bootstrap 5 variable overrides: Light mode ───────────────── */
:root {
  --bs-primary:              var(--fc-primary);
  --bs-primary-rgb:          var(--fc-primary-rgb);
  --bs-body-bg:              var(--fc-bg);
  --bs-body-color:           var(--fc-text);
  --bs-body-font-family:     var(--fc-font-body);
  --bs-link-color:           var(--fc-primary);
  --bs-link-color-rgb:       var(--fc-primary-rgb);
  --bs-link-hover-color:     var(--fc-primary-hover);
  --bs-border-color:         var(--fc-border);
  --bs-secondary-color:      var(--fc-text-muted);
  --bs-card-bg:              var(--fc-surface);
  --bs-card-border-color:    var(--fc-border);
  --bs-navbar-color:         var(--fc-text);
  --bs-navbar-hover-color:   var(--fc-primary);
  --bs-tertiary-bg:          var(--fc-surface-warm);
}

/* ── Bootstrap 5 variable overrides: Dark mode ────────────────── */
[data-bs-theme="dark"] {
  --bs-primary:              var(--fc-primary);
  --bs-primary-rgb:          var(--fc-primary-rgb);
  --bs-body-bg:              var(--fc-bg);
  --bs-body-color:           var(--fc-text);
  --bs-link-color:           var(--fc-primary);
  --bs-link-color-rgb:       var(--fc-primary-rgb);
  --bs-link-hover-color:     var(--fc-primary-hover);
  --bs-border-color:         var(--fc-border);
  --bs-secondary-color:      var(--fc-text-muted);
  --bs-card-bg:              var(--fc-surface);
  --bs-card-border-color:    var(--fc-border);
  --bs-tertiary-bg:          var(--fc-surface-warm);
  --bs-navbar-color:         var(--fc-text);
  --bs-navbar-hover-color:   var(--fc-primary);
}

/* ── Typography ────────────────────────────────────────────────── */
body {
  font-family: var(--fc-font-body);
  color: var(--fc-text);
  background-color: var(--fc-bg);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3,
.display-4, .display-5, .display-6 {
  font-family: var(--fc-font-heading);
  color: var(--fc-text);
  line-height: 1.2;
}

.navbar-brand {
  font-family: var(--fc-font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--fc-text) !important;
}

/* Navbar link colors via our palette */
.navbar .nav-link {
  color: var(--fc-text) !important;
  font-weight: 500;
  transition: color 0.18s ease;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--fc-primary) !important;
}
.navbar.bg-white {
  background-color: var(--fc-surface) !important;
}

/* ── Buttons — Bootstrap 5 component variable overrides ────────── */
/* Primary button → terracotta */
.btn-primary {
  --bs-btn-color:               #fff;
  --bs-btn-bg:                  var(--fc-primary);
  --bs-btn-border-color:        var(--fc-primary);
  --bs-btn-hover-color:         #fff;
  --bs-btn-hover-bg:            var(--fc-primary-hover);
  --bs-btn-hover-border-color:  var(--fc-primary-hover);
  --bs-btn-active-color:        #fff;
  --bs-btn-active-bg:           var(--fc-primary-hover);
  --bs-btn-active-border-color: var(--fc-primary-hover);
  --bs-btn-focus-shadow-rgb:    var(--fc-primary-rgb);
}

/* Outline primary button → terracotta border/text, fills on hover */
.btn-outline-primary {
  --bs-btn-color:               var(--fc-primary);
  --bs-btn-border-color:        var(--fc-primary);
  --bs-btn-hover-color:         #fff;
  --bs-btn-hover-bg:            var(--fc-primary);
  --bs-btn-hover-border-color:  var(--fc-primary);
  --bs-btn-active-color:        #fff;
  --bs-btn-active-bg:           var(--fc-primary-hover);
  --bs-btn-active-border-color: var(--fc-primary-hover);
  --bs-btn-focus-shadow-rgb:    var(--fc-primary-rgb);
}

/* Outline secondary → warm muted tone */
.btn-outline-secondary {
  --bs-btn-color:               var(--fc-text-muted);
  --bs-btn-border-color:        var(--fc-border);
  --bs-btn-hover-color:         var(--fc-text);
  --bs-btn-hover-bg:            var(--fc-surface-warm);
  --bs-btn-hover-border-color:  var(--fc-border);
  --bs-btn-active-color:        var(--fc-text);
  --bs-btn-active-bg:           var(--fc-surface-warm);
}

/* ── Form controls ─────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--fc-primary-rgb), 0.2);
}

/* ── Badge overrides ───────────────────────────────────────────── */
.badge.bg-secondary {
  background-color: var(--fc-surface-warm) !important;
  color: var(--fc-secondary) !important;
}

/* ── Text colour utilities ─────────────────────────────────────── */
.text-primary { color: var(--fc-primary) !important; }
.text-muted   { color: var(--fc-text-muted) !important; }

/* ── End Phase 3 Design System ─────────────────────────────────── */

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

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Focus ring uses our accent colour (was hardcoded Bootstrap blue) */
.btn:focus, .btn:active:focus,
.btn-link.nav-link:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem var(--fc-surface), 0 0 0 0.25rem var(--fc-primary);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  /* Layout properties — font/color/bg are set in the design system block above */
  margin-bottom: 2rem;
  overflow-x: hidden;
  padding-bottom: 5rem;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Product image zoom (Details page) */
.product-details-image-col {
  /* Must be hidden to prevent the zoom panel from causing horizontal overflow */
  overflow: hidden;
}

/* On desktop where zoom panel is displayed, allow it to escape the column */
@media (hover: hover) and (min-width: 768px) {
  .product-details-image-col {
    overflow: visible;
  }
}

.product-image-zoom {
  position: relative;
}

.product-image-zoom__main {
  position: relative;
  overflow: hidden;
}

.product-image-zoom__img {
  display: block;
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

/* Ensure image has a sensible minimum height only on larger screens */
@media (min-width: 768px) {
  .product-image-zoom__img {
    min-height: 280px;
  }
}

@media (hover: hover) and (min-width: 768px) {
  .product-image-zoom__main {
    cursor: zoom-in;
  }

  .product-image-zoom__panel {
    position: absolute;
    top: 0;
    left: calc(100% + 12px);
    width: 280px;
    height: 280px;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #fff;
    background-repeat: no-repeat;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 20;
  }

  .product-image-zoom.is-active .product-image-zoom__panel {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 767.98px), (hover: none) {
  .product-image-zoom__panel {
    display: none;
  }
}

/* Floating WhatsApp button */
.whatsapp-float {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  /* Entrance animation plays once (0.4s delay after page load),
     then the pulse animation loops indefinitely after the entrance completes (1.05s total). */
  animation:
    whatsapp-entrance 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both,
    whatsapp-float-pulse 2.5s ease-in-out 1.05s infinite;
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  color: #fff;
  background-color: #20bd5a;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}

.whatsapp-float:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.whatsapp-float__icon {
  width: 1.75rem;
  height: 1.75rem;
  fill: currentColor;
}

@keyframes whatsapp-float-pulse {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
  }
  50% {
    box-shadow: 0 4px 22px rgba(37, 211, 102, 0.65), 0 0 0 8px rgba(37, 211, 102, 0.12);
  }
}

@media (min-width: 768px) {
  .whatsapp-float {
    width: 3.75rem;
    height: 3.75rem;
    right: max(1.5rem, env(safe-area-inset-right, 0px));
    bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  }

  .whatsapp-float__icon {
    width: 1.875rem;
    height: 1.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-float {
    /* Cancel both entrance and pulse animations for reduced-motion users */
    animation: none;
    opacity: 1;
  }
}

/* Catalog AJAX product list */
#productListContainer {
  transition: opacity 0.25s ease;
}

#productListContainer.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

/* ── Phase 4: Product Card Design ─────────────────────────────── */

/* Base card */
.product-card {
  background-color: var(--fc-surface);
  border: 1px solid var(--fc-border) !important;
  border-radius: 0.875rem !important;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(44, 24, 16, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Card lift on hover — only on devices that support hover (no touch stuck-state) */
@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(44, 24, 16, 0.13) !important;
    border-color: var(--fc-primary) !important;
  }
}

/* Image container: position context for heart button + clips zoom */
.product-card__img-container {
  position: relative;
  overflow: hidden;
}

/* Image link: block-level, clips the zoomed image */
.product-card__image-link {
  display: block;
  overflow: hidden;
  text-decoration: none;
}

/* Product image */
.product-card__img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* Image zoom on card hover — hover-capable devices only */
@media (hover: hover) {
  .product-card:hover .product-card__img {
    transform: scale(1.06);
  }
}

/* Card body typography */
.product-card__name {
  font-family: var(--fc-font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fc-text);
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.product-card__category {
  font-family: var(--fc-font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fc-text-muted);
  margin-bottom: 0.5rem;
}

.product-card__price {
  font-family: var(--fc-font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fc-primary);
  margin-bottom: 0.85rem;
}

/* View Details CTA button */
.product-card__cta {
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  padding: 0.45rem 1rem;
  transition: all 0.22s ease;
}

/* Wishlist heart button — uses CSS vars for light/dark theming */
.product-card .wishlist-toggle {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background-color: var(--fc-surface);
  color: var(--fc-text-muted);
  box-shadow: 0 2px 10px rgba(44, 24, 16, 0.15);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.product-card .wishlist-toggle:hover,
.product-card .wishlist-toggle:focus-visible {
  transform: scale(1.12);
  background-color: var(--fc-surface-warm);
  box-shadow: 0 4px 16px rgba(44, 24, 16, 0.22);
}

.product-card .wishlist-toggle:focus-visible {
  outline: 2px solid var(--fc-primary);
  outline-offset: 2px;
}

.product-card .wishlist-toggle .bi {
  font-size: 1rem;
  line-height: 1;
}

/* ── Skeleton loading cards ───────────────────────────────────── */
.skeleton-card {
  background: var(--fc-surface-warm);
  border-radius: 0.875rem;
  height: 340px;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1; }
}

/* ── Empty state (no search results / empty wishlist) ────────── */
.product-empty-state {
  padding: 3rem 1.5rem;
}

.product-empty-state__icon {
  font-size: 3.5rem;
  color: var(--fc-border);
  display: block;
  margin-bottom: 0.5rem;
}

.product-empty-state__title {
  font-family: var(--fc-font-heading);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--fc-text-muted);
  margin-bottom: 1.25rem;
}

/* =============================================================
   PHASE 5: Hero Section
   ============================================================= */

/* ── Hero section ─────────────────────────────────────────────── */
.hero-section {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  min-height: 460px;
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  /* Warm gradient: terracotta radial glow over warm off-white base */
  background:
    radial-gradient(ellipse at 78% 18%, rgba(196, 113, 78, 0.25) 0%, transparent 52%),
    radial-gradient(ellipse at 12% 88%, rgba(107, 66, 38, 0.12) 0%, transparent 42%),
    linear-gradient(150deg, var(--fc-bg) 0%, #EDE0D0 55%, #E2CBBB 100%);
}

[data-bs-theme="dark"] .hero-section {
  background:
    radial-gradient(ellipse at 78% 18%, rgba(212, 133, 106, 0.20) 0%, transparent 52%),
    radial-gradient(ellipse at 12% 88%, rgba(107, 66, 38, 0.28) 0%, transparent 42%),
    linear-gradient(150deg, #1C1410 0%, #231812 52%, #2B1D14 100%);
}

/* Subtle dot grid texture overlay */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(107,66,38,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 1;
}

/* Decorative ring shape on the right */
.hero-section::after {
  content: '';
  position: absolute;
  right: -6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 440px;
  height: 440px;
  border-radius: 50%;
  border: 1.5px solid rgba(196, 113, 78, 0.18);
  pointer-events: none;
  z-index: 1;
}

/* Inner layout: two columns (content + deco blob) */
.hero-section__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 4.5rem 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}

.hero-section__content {
  max-width: 580px;
}

/* ── Hero eyebrow pill ─────────────────────────────────────────── */
.hero-section__eyebrow {
  display: inline-block;
  font-family: var(--fc-font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fc-primary);
  border: 1px solid rgba(196, 113, 78, 0.45);
  border-radius: 100px;
  padding: 0.28rem 0.9rem;
  margin-bottom: 1.35rem;
  backdrop-filter: blur(4px);
}

/* ── Hero heading ──────────────────────────────────────────────── */
.hero-section__heading {
  font-family: var(--fc-font-heading);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.14;
  color: var(--fc-text);
  margin-bottom: 1.1rem;
}

/* Italic highlight in heading */
.hero-section__heading em {
  font-style: italic;
  color: var(--fc-primary);
}

/* ── Hero subtext ──────────────────────────────────────────────── */
.hero-section__subtext {
  font-family: var(--fc-font-body);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--fc-text-muted);
  margin-bottom: 2rem;
}

/* ── Hero CTA button ───────────────────────────────────────────── */
.hero-section__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--fc-primary);
  color: #fff;
  border: none;
  border-radius: 0.65rem;
  padding: 0.85rem 2.25rem;
  font-family: var(--fc-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-decoration: none;
  transition: background-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow: 0 4px 18px rgba(196, 113, 78, 0.3);
}

.hero-section__cta:hover,
.hero-section__cta:focus-visible {
  background-color: var(--fc-primary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(196, 113, 78, 0.4);
}

.hero-section__cta:focus-visible {
  outline: 2px solid var(--fc-primary);
  outline-offset: 3px;
}

/* ── Hero decorative blob ──────────────────────────────────────── */
.hero-section__deco {
  position: relative;
  flex-shrink: 0;
  width: 280px;
  height: 280px;
}

.hero-section__deco::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 62% 38% 68% 32% / 42% 58% 32% 68%;
  background: linear-gradient(
    135deg,
    rgba(196, 113, 78, 0.28) 0%,
    rgba(107, 66, 38, 0.16) 100%
  );
  animation: hero-blob-morph 9s ease-in-out infinite;
}

.hero-section__deco::after {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 42% 58% 32% 68% / 62% 38% 68% 32%;
  border: 1.5px solid rgba(196, 113, 78, 0.28);
  animation: hero-blob-morph 9s ease-in-out infinite reverse;
}

@keyframes hero-blob-morph {
  0%, 100% { border-radius: 62% 38% 68% 32% / 42% 58% 32% 68%; }
  33%       { border-radius: 52% 48% 42% 58% / 58% 52% 48% 42%; }
  66%       { border-radius: 38% 62% 58% 42% / 48% 42% 58% 52%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-section__deco::before,
  .hero-section__deco::after {
    animation: none;
  }
}

/* ── Hero: mobile layout ───────────────────────────────────────── */
@media (max-width: 767.98px) {
  .hero-section {
    min-height: 0;
    border-radius: 1rem;
    margin-bottom: 2rem;
  }

  .hero-section::after {
    display: none; /* hide the large ring on mobile */
  }

  .hero-section__inner {
    padding: 2.75rem 1.75rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .hero-section__deco {
    display: none; /* decorative blob hidden on mobile */
  }

  .hero-section__content {
    max-width: 100%;
  }

  .hero-section__heading {
    font-size: 2.1rem;
  }
}

/* ── Hero: tablet layout ───────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-section__inner {
    padding: 3.5rem 2.5rem;
  }

  .hero-section__deco {
    width: 190px;
    height: 190px;
  }
}

/* ── Catalog filter card ───────────────────────────────────────── */
.catalog-filter-card {
  background-color: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 1rem;
  box-shadow: 0 2px 16px rgba(44, 24, 16, 0.06);
  padding: 1.5rem;
}

/* Smooth catalog section entry */
.catalog-section {
  scroll-margin-top: 1rem;
}

/* =============================================================
   PHASE 6: Product Details Page
   ============================================================= */

/* ── Details card wrapper ──────────────────────────────────────── */
.details-card {
  background-color: var(--fc-surface);
  border-radius: 1.25rem !important;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(44, 24, 16, 0.08);
}

/* ── Breadcrumb ────────────────────────────────────────────────── */
.breadcrumb {
  font-family: var(--fc-font-body);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.breadcrumb-item a {
  color: var(--fc-text-muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.breadcrumb-item a:hover {
  color: var(--fc-primary);
}

.breadcrumb-item.active {
  color: var(--fc-text);
  font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--fc-border);
}

/* ── Info panel ────────────────────────────────────────────────── */
.details-info {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ── Category badge ────────────────────────────────────────────── */
.details-category-badge {
  display: inline-block;
  font-family: var(--fc-font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fc-secondary);
  background-color: var(--fc-surface-warm);
  border: 1px solid var(--fc-border);
  border-radius: 100px;
  padding: 0.25rem 0.85rem;
  margin-bottom: 1rem;
}

/* ── Product title ─────────────────────────────────────────────── */
.details-product-title {
  font-family: var(--fc-font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fc-text);
  margin-bottom: 0.75rem;
}

/* ── Price ─────────────────────────────────────────────────────── */
.details-price {
  font-family: var(--fc-font-body);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--fc-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.details-price__currency {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.8;
  margin-right: 0.1rem;
}

/* ── Section labels (Description / Colors) ─────────────────────── */
.details-section__label {
  font-family: var(--fc-font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fc-text-muted);
  margin-bottom: 0.6rem;
}

.details-section__body {
  font-family: var(--fc-font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--fc-text);
}

/* ── Color swatches ────────────────────────────────────────────── */
.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.color-swatch {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 2px solid var(--fc-border);
  background-color: var(--swatch-color, #ccc);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 2px 6px rgba(44, 24, 16, 0.12);
}

.color-swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(44, 24, 16, 0.22);
}

.color-swatch.active {
  border-color: var(--fc-primary);
  border-width: 2.5px;
  box-shadow: 0 0 0 3px rgba(var(--fc-primary-rgb), 0.25), 0 4px 14px rgba(44, 24, 16, 0.18);
  transform: scale(1.15);
}

.color-swatch:focus-visible {
  outline: 2px solid var(--fc-primary);
  outline-offset: 3px;
}

/* ── Main product image fade transition ─────────────────────────── */
#mainProductImage {
  transition: opacity 0.25s ease;
}

#mainProductImage.fade-out {
  opacity: 0.4;
}

/* ── WhatsApp order button ─────────────────────────────────────── */
.details-whatsapp-btn {
  background-color: #25D366;
  color: #fff;
  border: none;
  border-radius: 0.65rem;
  padding: 0.9rem 1.75rem;
  font-family: var(--fc-font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.3);
  margin-top: auto;
}

.details-whatsapp-btn:hover,
.details-whatsapp-btn:focus-visible {
  background-color: #1ebe5a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.4);
}

.details-whatsapp-btn:focus-visible {
  outline: 2px solid #25D366;
  outline-offset: 3px;
}

/* ── Details mobile: full stack, comfortable spacing ───────────── */
@media (max-width: 767.98px) {
  .details-card {
    border-radius: 1rem !important;
  }

  .details-info {
    padding: 1.5rem !important;
  }

  .details-price {
    font-size: 1.5rem;
  }
}

/* =============================================================
   PHASE 7: Micro-interactions & Polish
   ============================================================= */

/* \u2500\u2500 WhatsApp button entrance animation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
/* Plays once on page load via cubic-bezier spring, then pulse takes over */
@keyframes whatsapp-entrance {
  from {
    opacity: 0;
    transform: translateY(1.75rem) scale(0.5);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* \u2500\u2500 Wishlist heart heartbeat animation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
/* Triggered via JS class add/remove on toggle — no logic change */
@keyframes wishlist-heartbeat {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.45); }
  50%  { transform: scale(0.88); }
  75%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.product-card .wishlist-toggle.wishlist-heartbeat {
  animation: wishlist-heartbeat 0.48s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
  /* Override the hover transform during the brief heartbeat window */
  transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
  .product-card .wishlist-toggle.wishlist-heartbeat {
    animation: none;
  }
}

/* \u2500\u2500 Focus-visible accessibility polish \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
/* Global accent ring for keyboard navigation on any focused element */
:focus-visible {
  outline: 2px solid var(--fc-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Form inputs use box-shadow for focus (already set), suppress the outline */
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible {
  outline: none;
}

/* Anchors and nav links: accent underline on keyboard focus */
a:focus-visible {
  outline: 2px solid var(--fc-primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Navbar toggler (hamburger) — visible focus ring on keyboard nav */
.navbar-toggler:focus-visible {
  outline: 2px solid var(--fc-primary);
  outline-offset: 3px;
  box-shadow: none;
}

/* Card CTA (View Details) — accent outline */
.product-card__cta:focus-visible {
  outline: 2px solid var(--fc-primary);
  outline-offset: 3px;
}

/* \u2500\u2500 Empty-state entrance fade \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
@keyframes empty-state-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-empty-state {
  animation: empty-state-enter 0.4s ease 0.1s both;
}

@media (prefers-reduced-motion: reduce) {
  .product-empty-state {
    animation: none;
  }
}

/* \u2500\u2500 Product grid card stagger entrance \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
/* Cards fade up gently when the grid first renders */
@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger the cards using :nth-child delays */
#productListContainer .col-12 {
  animation: card-enter 0.35s ease both;
}
#productListContainer .col-12:nth-child(1)  { animation-delay: 0.04s; }
#productListContainer .col-12:nth-child(2)  { animation-delay: 0.09s; }
#productListContainer .col-12:nth-child(3)  { animation-delay: 0.14s; }
#productListContainer .col-12:nth-child(4)  { animation-delay: 0.19s; }
#productListContainer .col-12:nth-child(5)  { animation-delay: 0.23s; }
#productListContainer .col-12:nth-child(6)  { animation-delay: 0.27s; }
#productListContainer .col-12:nth-child(7)  { animation-delay: 0.31s; }
#productListContainer .col-12:nth-child(8)  { animation-delay: 0.34s; }
#productListContainer .col-12:nth-child(n+9) { animation-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  #productListContainer .col-12 {
    animation: none;
  }
}

/* ── Smooth transition on #productListContainer opacity swap ── */
/* Already defined above, just ensure transition duration is comfortable */
#productListContainer {
  transition: opacity 0.3s ease;
}

/* =============================================================
   PHASE 8: About Page
   ============================================================= */

/* ── Headers ────────────────────────────────────────────────── */
.about-header {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.about-header__title {
  font-family: var(--fc-font-heading);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--fc-text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.about-header__subtitle {
  font-family: var(--fc-font-body);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--fc-text-muted);
  line-height: 1.6;
}

/* ── Badges ─────────────────────────────────────────────────── */
.about-badge {
  display: inline-block;
  font-family: var(--fc-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fc-secondary);
  background-color: var(--fc-surface-warm);
  border: 1px solid var(--fc-border);
  border-radius: 100px;
  padding: 0.35rem 1rem;
}

/* ── Section Typography ─────────────────────────────────────── */
.about-section__title {
  font-family: var(--fc-font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--fc-text);
  line-height: 1.25;
}

.about-section__text {
  font-family: var(--fc-font-body);
  font-size: 1.05rem;
  color: var(--fc-text-muted);
  line-height: 1.7;
}

/* ── Cards ──────────────────────────────────────────────────── */
.about-card {
  background-color: var(--fc-surface);
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(44, 24, 16, 0.05);
  border: 1px solid var(--fc-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(44, 24, 16, 0.1);
}

.about-card--warm {
  background-color: var(--fc-surface-warm);
  border: none;
}

/* ── Hero Box ───────────────────────────────────────────────── */
.about-hero-box {
  background: linear-gradient(135deg, var(--fc-surface-warm), var(--fc-bg));
  height: 100%;
}

.about-hero-box__icon {
  font-size: 4.5rem;
  color: var(--fc-primary);
}

.about-hero-box__text {
  font-family: var(--fc-font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--fc-text);
}

/* ── Features ───────────────────────────────────────────────── */
.about-feature-icon {
  font-size: 2.8rem;
  color: var(--fc-primary);
  display: inline-block;
  transition: transform 0.3s ease;
}

.about-card:hover .about-feature-icon {
  transform: scale(1.1) translateY(-5px);
}

.about-feature-title {
  font-family: var(--fc-font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--fc-text);
  margin-bottom: 0.75rem;
}

.about-feature-text {
  font-family: var(--fc-font-body);
  font-size: 0.95rem;
  color: var(--fc-text-muted);
  line-height: 1.6;
}

/* ── List Items ─────────────────────────────────────────────── */
.about-list-icon {
  font-size: 1.75rem;
  color: var(--fc-primary);
  flex-shrink: 0;
}

.about-list-title {
  font-family: var(--fc-font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fc-text);
}

.about-list-text {
  font-family: var(--fc-font-body);
  font-size: 0.95rem;
  color: var(--fc-text-muted);
  line-height: 1.5;
}

/* ── CTA ────────────────────────────────────────────────────── */
.about-cta-btn {
  font-family: var(--fc-font-body);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 1rem 2.5rem;
  border-radius: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--fc-primary-rgb), 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .about-card,
  .about-feature-icon,
  .about-cta-btn {
    transition: none;
  }
  .about-card:hover {
    transform: none;
  }
  .about-card:hover .about-feature-icon {
    transform: none;
  }
}

/* =============================================================
   ADMIN PANEL REDESIGN
   ============================================================= */

.admin-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--fc-bg);
}

/* ── Sidebar ────────────────────────────────────────────────── */
.admin-sidebar {
  width: 280px;
  background-color: var(--fc-surface);
  border-right: 1px solid var(--fc-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar__brand {
  padding: 1.5rem;
  font-family: var(--fc-font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fc-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--fc-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-sidebar__nav {
  padding: 1.5rem 1rem;
  flex-grow: 1;
}

.admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  color: var(--fc-text-muted);
  text-decoration: none;
  border-radius: 0.5rem;
  font-family: var(--fc-font-body);
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}

.admin-sidebar__link i {
  font-size: 1.1rem;
}

.admin-sidebar__link:hover, .admin-sidebar__link.active {
  background-color: rgba(var(--fc-primary-rgb), 0.1);
  color: var(--fc-primary);
}

.admin-sidebar__footer {
  padding: 1.5rem;
  border-top: 1px solid var(--fc-border);
}

.admin-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  color: var(--fc-text);
  background-color: var(--fc-surface-warm);
  border: 1px solid var(--fc-border);
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background-color 0.2s;
}

.admin-logout-btn:hover {
  background-color: var(--fc-border);
}

/* ── Main Content Area ──────────────────────────────────────── */
.admin-main {
  flex-grow: 1;
  padding: 2.5rem;
  min-width: 0; /* Prevent flex overflow */
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-title {
  font-family: var(--fc-font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--fc-text);
  margin: 0;
}

/* ── Admin Cards & Tables ───────────────────────────────────── */
.admin-card {
  background-color: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.admin-card-body {
  padding: 1.5rem;
}

.admin-table {
  margin-bottom: 0;
  color: var(--fc-text);
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background-color: var(--fc-surface-warm);
  color: var(--fc-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--fc-border);
}

.admin-table td {
  padding: 1rem 1.5rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--fc-border);
  color: var(--fc-text);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background-color: rgba(var(--fc-primary-rgb), 0.02);
}

.admin-img-thumbnail {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid var(--fc-border);
}

.admin-form-label {
  font-weight: 600;
  color: var(--fc-text);
  margin-bottom: 0.5rem;
}

/* Mobile Sidebar Toggle */
.admin-mobile-toggle {
  display: none;
}

@media (max-width: 768px) {
  .admin-wrapper {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--fc-border);
  }
  .admin-sidebar__nav, .admin-sidebar__footer {
    display: none; /* Hide nav by default on mobile */
  }
  .admin-sidebar.expanded .admin-sidebar__nav,
  .admin-sidebar.expanded .admin-sidebar__footer {
    display: block;
  }
  .admin-main {
    padding: 1.5rem;
  }
  .admin-mobile-toggle {
    display: block;
    position: absolute;
    right: 1rem;
    top: 1.2rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--fc-text);
  }
}