/* Global responsive overrides and mobile navigation styles
   Applied after page-specific CSS to provide robust mobile layout
*/
:root {
  --mobile-break: 900px;
}

/* Mobile-first defaults */
html,
body {
  -webkit-text-size-adjust: 100%;
}

/* NAVIGATION: hide desktop links and show hamburger on small screens */
.mobile-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #000;
  color: #fff;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.mobile-nav-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* mobile nav panel that slides from top */
.mobile-nav-panel {
  position: fixed;
  inset: 0 0 auto 0;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(-110%);
  transition: transform 320ms cubic-bezier(.2, .9, .2, 1);
  background: #fff;
  z-index: 99999;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
  padding: 20px;
}

.mobile-nav-panel .mobile-nav-inner {
  max-width: 520px;
  margin: 0 auto;
}

.mobile-nav-panel .nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-start;
}

.mobile-nav-panel .nav-links a {
  color: #231c17;
  font-weight: 700;
  font-size: 1.05rem;
}

.mobile-nav-panel .nav-links {
  display: flex !important;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
  z-index: 99998;
}

/* when open */
.mobile-open .mobile-nav-panel {
  transform: translateY(0);
}

.mobile-open .mobile-nav-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* Hide desktop nav-links and show hamburger on small screens */
@media (max-width: 900px) {
  .nav-links {
    display: none !important;
  }

  .nav-icons {
    gap: 8px;
  }

  /* ensure hamburger is visible */
  .mobile-nav-toggle {
    display: inline-flex !important;
  }

  /* adjust navbar padding */
  .navbar {
    padding: 12px 16px !important;
  }
}

/* Center the logo on small screens while keeping hamburger left and icons right */
@media (max-width: 900px) {
  .navbar {
    position: relative;
  }

  .navbar .logo {
    position: relative;
    left: auto;
    transform: none;
    z-index: 2100;
    pointer-events: auto;
    margin-left: 12px;
    max-width: calc(60%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* give navbar a consistent height on small screens so icons/logo align vertically */
  .navbar {
    height: 64px;
  }

  /* add left padding so content doesn't clash with the left-edge toggle */
  .navbar {
    padding-left: 64px !important;
  }

  /* ensure nav-icons remain on the right */
  .nav-icons {
    margin-right: 12px;
  }
}

/* Ensure hamburger is left, logo centered, icons right across all pages */
@media (max-width: 900px) {

  .navbar .mobile-nav-toggle,
  .navbar .mobile-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2200;
    width: 40px;
    height: 40px;
    padding: 6px;
    background: transparent;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* anchor nav-icons to the right and prevent wrapping */
  /* tighten spacing between icons and keep them inside the navbar edge */
  .navbar .nav-icons {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 2100;
    white-space: nowrap;
  }

  .navbar .nav-icons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: transparent;
    border: none;
    margin-left: 4px;
    border-radius: 6px;
  }

  .navbar .nav-icons button svg {
    display: block;
    width: 20px;
    height: 20px;
  }

  /* fallback hamburger visuals if script doesn't inject SVG */
  .navbar .mobile-toggle .hamburger-icon,
  .navbar .mobile-nav-toggle .hamburger-icon {
    width: 20px;
    height: 2px;
    background: #fff;
    box-shadow: 0 6px 0 #fff, 0 -6px 0 #fff;
    border-radius: 2px;
    display: block;
  }

  /* small screen tweak */
  @media (max-width: 360px) {

    .navbar .mobile-nav-toggle,
    .navbar .mobile-toggle {
      left: 8px;
    }

    .navbar .nav-icons {
      right: 8px;
      gap: 8px;
    }

    .navbar .logo {
      font-size: 1.1rem !important;
    }
  }
}

/* Normalize navbar colors/spacing on mobile so index matches other pages */
@media (max-width: 900px) {
  .navbar {
    background: #000 !important;
    color: #fff !important;
  }

  .navbar .logo {
    color: #fff !important;
    font-size: 1.6rem;
  }

  .nav-icons .search-btn,
  .nav-icons .fav-btn,
  .nav-icons .cart-btn,
  .mobile-nav-toggle {
    background: #000 !important;
    color: #fff !important;
  }

  .nav-icons {
    gap: 10px;
  }

  .nav-icons .search-btn svg,
  .nav-icons .fav-btn svg,
  .nav-icons .cart-btn svg {
    fill: currentColor;
  }
}

/* Remove rounded corners on small screens only; restore desktop radii */
@media (max-width: 900px) {

  .navbar,
  .mobile-nav-panel,
  .mobile-nav-panel .mobile-nav-inner,
  .mobile-nav-toggle,
  .mobile-toggle,
  .cart-drawer .cart-panel,
  .fav-drawer .fav-panel,
  .checkout-panel,
  .product-modal-content {
    border-radius: 0 !important;
  }
}

/* Make nav-links wrap on mid screens for improved layout */
@media (min-width: 901px) {
  .mobile-nav-toggle {
    display: none !important;
  }
}

/* Ensure hero/typography scale nicely on small screens */
@media (max-width: 480px) {

  .hero-title,
  .about-hero h1 {
    font-size: 1.8rem !important;
  }

  .slide-title {
    font-size: 1.4rem !important;
  }

  .hero-sub,
  .slide-subtitle {
    font-size: 0.95rem !important;
  }
}

/* Grids: force single column where appropriate (extra safety) */
@media (max-width: 900px) {

  .products-grid,
  .best-sellers-list,
  .promotions-list {
    grid-template-columns: 1fr !important;
    display: grid;
    gap: 16px;
  }

  .promotions-list {
    overflow-x: visible;
  }

  .collection-content .products-grid {
    grid-template-columns: 1fr !important;
    transform: none !important;
    width: 100% !important;
  }

  .about-content .about-grid,
  .contact-grid,
  .product-grid,
  .new-products .products-grid {
    grid-template-columns: 1fr !important;
  }

  .product-modal-content {
    width: 96% !important;
  }
}

/* Make drawers full-width on small screens for better UX */
@media (max-width: 600px) {

  .cart-drawer .cart-panel,
  .fav-drawer .fav-panel {
    width: 100% !important;
  }

  .cart-drawer .cart-panel {
    right: 0;
  }
}

/* Show two cards per row on narrow mobile screens for collection & promotions */
@media (max-width: 600px) {

  .promotions-list,
  .products-grid,
  .collection-content .products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Ensure cards adapt to grid cells instead of fixed min-widths used elsewhere */
  .promo-card,
  .product-card,
  .best-seller-card {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* reduce card image heights slightly so two stacked rows fit better on short screens */
  .promo-img,
  .product-img {
    height: 160px !important;
  }
}

/* Fix alignment issues under the mobile filter bar (promotions) */
@media (max-width: 600px) {

  /* ensure promotions grid items align to the top of their cells */
  .promotions-list,
  .products-grid,
  .collection-content .products-grid {
    align-items: start !important;
    align-content: start !important;
    grid-auto-rows: auto !important;
  }

  /* make each card anchor to the top so rows line up */
  .promo-card,
  .product-card,
  .best-seller-card {
    align-self: start !important;
    margin-top: 0 !important;
  }

  /* compact the filters bar so it doesn't push the first row down
     make labels inline and controls vertically centered */
  .filters {
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    margin: 8px 10px !important;
  }

  .filters label {
    display: inline-block !important;
    margin: 0 8px 0 0 !important;
    vertical-align: middle !important;
  }

  .filters .filter,
  .filters .select-wrapper,
  .filter-select {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
  }

  /* make sure the grid sits directly under the filters with a small gap */
  .filters+.promotions-list,
  .filters+.products-grid {
    margin-top: 8px !important;
  }
}

/* Modern mobile filter styles for collection & promotions */
@media (max-width: 600px) {

  /* wrapper that might exist on collection/promotions pages */
  .filters,
  .filter-row,
  .collection-filters,
  .promotions-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: center !important;
    padding: 12px 14px !important;
    background: transparent !important;
  }

  /* each filter control becomes a pill-style block (two columns) */
  .filters .filter,
  .filter-group,
  .filter-select,
  .filters select,
  .filters .select-wrapper {
    flex: 1 1 calc(50% - 10px) !important;
    min-width: 0 !important;
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04) !important;
  }

  /* make native selects look modern and full-width inside pill */
  .filters select {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 0.98rem !important;
    color: #231c17 !important;
  }

  /* primary filter action button — prominent and full width on small screens */
  .filters .filter-action,
  .filter-apply,
  .filter-btn,
  .filters .apply-btn {
    flex: 1 1 100% !important;
    background: #231c17 !important;
    color: #f5e8d6 !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    text-align: center !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(35, 28, 23, 0.12) !important;
    cursor: pointer !important;
    margin-top: 6px !important;
  }

  /* small helper: label above each select, subtle and uppercase */
  .filters label {
    display: block;
    width: 100%;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  /* ensure the clear/reset controls are smaller and inline */
  .filters .filter-clear {
    flex: 0 0 auto !important;
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    padding: 8px !important;
  }
}

/* Hide logo plus cart/favorites icons while login drawer is open */
body.login-open .logo,
body.login-open #site-logo,
body.login-open .mobile-top-strip .ts-logo,
body.login-open .nav-icons .cart-btn,
body.login-open .nav-icons .fav-btn,
body.login-open .mobile-top-strip .cart-btn,
body.login-open .mobile-top-strip .fav-btn {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 180ms ease;
}

/* --- Enhanced "wow" styling for mobile filters --- */
@media (max-width: 600px) {

  /* sticky frosted filter bar so controls are always near the top */
  .filters {
    position: sticky !important;
    top: 8px !important;
    z-index: 1200 !important;
    margin: 10px 12px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 243, 240, 0.86)) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(6px) saturate(110%) !important;
    -webkit-backdrop-filter: blur(6px) saturate(110%) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
  }

  /* pill controls: modern glassy look with smooth hover + active states */
  .filters .filter,
  .filter-group,
  .filter-select,
  .filters select,
  .filters .select-wrapper {
    background: linear-gradient(180deg, #fff, #fbf8f6) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
    box-shadow: 0 8px 18px rgba(35, 28, 23, 0.06) !important;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 1 calc(50% - 10px) !important;
    min-width: 0 !important;
  }

  /* enlarge font slightly for better readability */
  .filters .filter,
  .filters select {
    font-size: 1rem !important;
    color: #231c17 !important;
  }

  /* subtle lift on tap / hover */
  .filters .filter:active,
  .filters .filter:focus,
  .filters .filter:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 14px 30px rgba(35, 28, 23, 0.08) !important;
    border-color: rgba(35, 28, 23, 0.09) !important;
  }

  /* add a caret glyph for selects using a small pseudo element */
  .filters .select-wrapper {
    position: relative !important;
  }

  .filters .select-wrapper::after {
    content: "\25BE";
    /* small down caret */
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: rgba(0, 0, 0, 0.45) !important;
    font-size: 0.9rem !important;
    pointer-events: none !important;
  }

  /* Custom-styled dropdown container to make selects look like pills */
  .filters .select-wrapper {
    display: block !important;
    width: 100% !important;
    height: 44px !important;
    border-radius: 10px !important;
    padding: 6px 40px 6px 12px !important;
    /* leave space for caret */
    box-sizing: border-box !important;
    background: linear-gradient(180deg, #fff, #fbf8f6) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 8px 18px rgba(35, 28, 23, 0.04) !important;
    transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease !important;
  }

  /* Style the native select inside the wrapper to be transparent and full-size */
  .filters .select-wrapper select {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 1rem !important;
    color: #231c17 !important;
    cursor: pointer !important;
  }

  /* Focus / active state for the wrapper */
  .filters .select-wrapper:focus-within {
    outline: none !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 14px 30px rgba(35, 28, 23, 0.08) !important;
    border-color: rgba(35, 28, 23, 0.12) !important;
  }

  /* Hide native dropdown arrow on some browsers */
  .filters .select-wrapper select::-ms-expand {
    display: none !important;
  }

  /* prominent apply button: glossy gradient, full-width row below controls */
  .filters .filter-action,
  .filter-apply,
  .filter-btn,
  .filters .apply-btn {
    flex: 1 1 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(180deg, #2b231d, #1f1612) !important;
    color: #f5e8d6 !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    text-align: center !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
    border: none !important;
    box-shadow: 0 12px 30px rgba(35, 28, 23, 0.18) !important;
    transition: transform 150ms ease, box-shadow 150ms ease !important;
  }

  .filters .filter-action:active,
  .filters .filter-action:focus,
  .filters .filter-action:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 18px 40px rgba(35, 28, 23, 0.22) !important;
  }

  /* active filter chips shown under the filters bar */
  .filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 12px 0 12px;
  }

  .filter-chips .filter-chip {
    background: #231c17;
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    box-shadow: 0 10px 24px rgba(35, 28, 23, 0.12);
    display: inline-flex;
    gap: 8px;
    align-items: center;
  }

  .filter-chips .filter-chip button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    cursor: pointer;
  }

  /* small clear link inline */
  .filters .filter-clear {
    color: #8a8a8a !important;
    font-weight: 700 !important;
  }

  /* compact helper text under each control if labels exist */
  .filters .small-label {
    display: block;
    font-size: 0.72rem;
    color: #7a7a7a;
    margin-top: 6px;
  }

  /* ensure the sticky area doesn't hide the first page content when fixed */
  .filters+* {
    margin-top: 6px !important;
  }
}

/* Buttons/touch targets: increase tappable size on mobile */
@media (max-width: 900px) {

  .overlay-btn,
  .nav-icons .search-btn,
  .nav-icons .fav-btn,
  .nav-icons .cart-btn {
    width: 48px;
    height: 48px;
  }

  .overlay-btn svg {
    width: 20px;
    height: 20px;
  }

  /* Sur mobile: masquer le bouton "Voir" (œil) dans l'overlay des cartes.
     Seuls le panier et le like restent visibles. */
  .card-overlay .overlay-btn[aria-label="Voir"] {
    display: none !important;
  }

  /* Centrer les 2 boutons restants dans l'overlay */
  .card-overlay {
    gap: 20px;
  }
}

/* WhatsApp quick action button (next to buy/add buttons) */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, #23c25e, #1fa954);
  color: #fff;
  border: none;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  margin-left: 10px;
  box-shadow: 0 12px 30px rgba(31, 169, 84, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
  font-size: 0.95rem;
}

.btn-whatsapp__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.btn-whatsapp__icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Safety clamp: prevent the whatsapp image or button from growing unexpectedly
   (this guards against very large source images or container flex stretching) */
.product-actions .btn-whatsapp,
.product-page .btn-whatsapp,
.product-modal .btn-whatsapp,
.product-modal-panel .btn-whatsapp {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 44px !important;
  min-height: 40px !important;
  max-height: 48px !important;
  padding: 8px 12px !important;
  font-size: 0.95rem !important;
  max-width: 180px !important;
}

.product-actions .btn-whatsapp .btn-whatsapp__icon img,
.product-page .btn-whatsapp .btn-whatsapp__icon img,
.product-modal .btn-whatsapp .btn-whatsapp__icon img,
.product-modal-panel .btn-whatsapp .btn-whatsapp__icon img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  object-fit: contain !important;
}

/* Extra guard: if the image is used elsewhere accidentally, limit its natural size */
.btn-whatsapp__icon img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* Desktop-specific: enforce explicit non-growing pill size and prevent huge images
   This targets screens wider than common mobile/tablet sizes (>=901px) */
@media (min-width: 901px) {

  .product-actions .btn-whatsapp,
  .product-page .btn-whatsapp,
  .product-modal .btn-whatsapp,
  .product-modal-panel .btn-whatsapp {
    flex: 0 0 auto !important;
    height: 44px !important;
    min-height: 40px !important;
    max-height: 48px !important;
    padding: 8px 12px !important;
    font-size: 0.95rem !important;
    width: auto !important;
    max-width: 220px !important;
    white-space: nowrap !important;
  }

  .product-actions .btn-whatsapp .btn-whatsapp__icon img,
  .product-page .btn-whatsapp .btn-whatsapp__icon img,
  .product-modal .btn-whatsapp .btn-whatsapp__icon img,
  .product-modal-panel .btn-whatsapp .btn-whatsapp__icon img {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain !important;
  }

  /* If any layout pushes the button into a huge container, ensure it doesn't overflow */
  .product-actions {
    align-items: center;
    gap: 8px;
  }
}

.btn-whatsapp__label {
  display: inline-block;
  line-height: 1;
}

.btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(31, 169, 84, 0.22);
}

.btn-whatsapp:active {
  transform: translateY(-1px);
}

.btn-whatsapp:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 169, 84, 0.14);
}

/* Compact on very small screens: show icon only to save space */
@media (max-width: 480px) {
  .btn-whatsapp {
    padding: 8px 8px;
    font-size: 0.86rem;
    margin-left: 6px;
  }

  .btn-whatsapp__label {
    display: none;
  }

  .btn-whatsapp__icon {
    width: 18px;
    height: 18px;
  }
}

/* Provide a subtle variant that matches ghost buttons (if needed) */
.btn-whatsapp--ghost {
  background: transparent;
  color: #25D366;
  box-shadow: none;
}

/* Small helper: reduce large fixed gaps on mobile */
@media (max-width: 900px) {
  .category-cta {
    gap: 18px;
    padding: 0 12px;
  }

  .promo-card,
  .product-card,
  .best-seller-card {
    margin: 0 auto;
  }
}

/* Accessibility: focus-visible ring for nav toggle */
.mobile-nav-toggle:focus {
  outline: 3px solid rgba(188, 170, 138, 0.18);
}

/* Checkout modal styles - polished */
.checkout-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200000;
  font-family: 'Montserrat', Arial, sans-serif;
}

.checkout-modal.open {
  display: flex;
}

.checkout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
}

.checkout-panel {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  width: 92%;
  max-width: 680px;
  padding: 24px;
  z-index: 2;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.checkout-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-family: 'Playfair Display', serif;
  color: var(--text, #231c17);
}

.checkout-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--muted, #6b6360);
}

.checkout-close:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text, #231c17);
}

.checkout-form {
  display: block;
}

.checkout-form .form-row {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
}

.checkout-form label {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--muted, #6b6360);
  font-size: 0.95rem;
}

.checkout-form input,
.checkout-form textarea {
  border: 1px solid #e9e5e2;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.98rem;
  outline: none;
  transition: box-shadow .14s, border-color .14s, transform .14s;
  background: #fff;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
  box-shadow: 0 8px 24px rgba(188, 169, 138, 0.14);
  border-color: #bca98a;
  transform: translateY(-1px);
}

.checkout-form .two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width:520px) {
  .checkout-form .two-cols {
    grid-template-columns: 1fr;
  }
}

.checkout-form .form-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
}

.hero-btn {
  background: var(--text, #231c17);
  color: #f5e8d6;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(35, 28, 23, 0.12);
}

.hero-btn.secondary {
  background: transparent;
  color: var(--text, #231c17);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: none;
}

.form-message {
  color: var(--muted, #6b6360);
  margin-top: 8px;
}

.checkout-panel .order-summary {
  margin-top: 12px;
  border-top: 1px dashed rgba(0, 0, 0, 0.06);
  padding-top: 12px;
  font-size: 0.95rem;
  color: var(--muted, #6b6360);
}

.checkout-modal[aria-hidden="true"] {
  display: none !important;
}

/* Scroll-to-top button (global) */
.to-top-btn {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: #231c17;
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}

.to-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Force favorite heart icons to be outline-only white */
.nav-icons .fav-btn svg,
.nav-icons .fav-btn svg path,
.nav-icons .fav-btn svg circle {
  fill: none !important;
  stroke: #fff !important;
}

.overlay-fav svg,
.overlay-fav svg path,
.overlay-fav svg circle {
  fill: none !important;
  stroke: currentColor !important;
}

.nav-icons .fav-btn {
  color: #fff !important;
}

/* High-specificity override: position the favorite-count badge centered above the heart
   Use !important only to safely override per-page rules without changing those files. */
.navbar .nav-icons .fav-btn {
  position: relative;
}

.navbar .nav-icons .fav-btn .fav-count {
  position: absolute !important;
  top: 8px !important;
  right: 6px !important;
  transform: translate(40%, -30%) !important;
  display: inline-block !important;
  background: #d9534f !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  min-width: 18px !important;
  height: 18px !important;
  line-height: 18px !important;
  padding: 0 6px !important;
  font-size: 12px !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

@media (max-width: 480px) {
  .navbar .nav-icons .fav-btn .fav-count {
    top: 6px !important;
    right: 4px !important;
    font-size: 10px !important;
    padding: 0 5px !important;
    transform: translate(32%, -32%) !important;
  }
}