/* ===========================================================
   Fardan Store - Frontend Stylesheet
   Clean white boutique theme: centred logo, uppercase navigation,
   full-width hero, image-led category tiles and a calm product grid.
   Built on Bootstrap 5 - only look & feel lives here, no behaviour.
   =========================================================== */

:root {
  --ink: #000;
  --ink-soft: #444;
  --muted: #767676;
  --line: #e4e4e4;
  --line-strong: #cfcfcf;
  --paper: #fff;
  --paper-alt: #f6f6f6;
  --sale: #c8102e;

  --font-body: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: var(--font-body);
  --icon-stroke-width: 1.3;

  /* Re-point Bootstrap's own tokens so every stock component follows the theme. */
  --bs-body-font-family: var(--font-body);
  --bs-body-color: #000;
  --bs-body-color-rgb: 0, 0, 0;
  --bs-body-bg: #fff;
  --bs-primary: #000;
  --bs-primary-rgb: 0, 0, 0;
  --bs-danger: #c8102e;
  --bs-danger-rgb: 200, 16, 46;
  --bs-border-color: #e4e4e4;
  --bs-border-color-translucent: rgba(0, 0, 0, .1);
  --bs-secondary-color: #767676;
  --bs-secondary-rgb: 118, 118, 118;
  --bs-link-color: #000;
  --bs-link-color-rgb: 0, 0, 0;
  --bs-link-hover-color: #000;
  --bs-link-hover-color-rgb: 0, 0, 0;
  --bs-border-radius: 0;
  --bs-border-radius-sm: 0;
  --bs-border-radius-lg: 0;
  --bs-border-radius-xl: 0;
  --bs-border-radius-xxl: 0;
}

html {
  overflow-x: hidden;
  scroll-padding-top: 150px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  /* "clip" (not "hidden") so the sticky header keeps working */
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.section-title, .navbar-brand, .brand-text {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: .01em;
}

a { color: inherit; text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--ink); }
p a:not(.btn), .alert a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.form-control:focus-visible, .form-select:focus-visible { outline: 0; }

@media (min-width: 992px) {
  .container { --bs-gutter-x: 3rem; }
}
@media (min-width: 1200px) {
  .container { --bs-gutter-x: 4rem; }
}
@media (min-width: 1400px) {
  .container { max-width: 1440px; }
}

/* ---------------- Theme overrides for Bootstrap utility classes ---------------- */
.bg-white { background-color: var(--paper) !important; color: var(--ink); }
.bg-light { background-color: var(--paper-alt) !important; color: var(--ink) !important; }
.text-dark { color: var(--ink) !important; }
.text-muted { color: var(--muted) !important; }
.text-primary { color: var(--ink) !important; }
.bg-primary { background-color: var(--ink) !important; }
.border { border-color: var(--line) !important; }
.border-light-subtle { border-color: var(--line) !important; }
.border-secondary { border-color: var(--line-strong) !important; }
hr { border-color: var(--line); opacity: 1; }
.rounded, .rounded-2, .rounded-3, .rounded-4 { border-radius: 0 !important; }

/* Flat panels: a hairline instead of a drop shadow */
.bg-white.shadow-sm { box-shadow: none !important; border: 1px solid var(--line); }

.card {
  background-color: var(--paper);
  color: var(--ink);
  border-color: var(--line);
  border-radius: 0;
}

.badge { border-radius: 0; font-weight: 500; letter-spacing: .06em; }
.badge.rounded-pill { border-radius: 999px; }
.badge.bg-light {
  background-color: var(--paper) !important;
  color: var(--ink) !important;
  border-color: var(--ink) !important;
  text-transform: uppercase;
  font-size: .68rem;
  padding: .4rem .65rem;
}

/* ---------------- Buttons ---------------- */
.btn {
  --bs-btn-font-family: var(--font-body);
  --bs-btn-font-size: .8rem;
  --bs-btn-font-weight: 500;
  --bs-btn-padding-x: 1.4rem;
  --bs-btn-padding-y: .7rem;
  --bs-btn-border-radius: 0;
  --bs-btn-focus-shadow-rgb: 0, 0, 0;
  text-transform: uppercase;
  letter-spacing: .1em;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn-lg { --bs-btn-padding-y: .9rem; --bs-btn-padding-x: 1.8rem; --bs-btn-font-size: .85rem; --bs-btn-border-radius: 0; }
.btn-sm { --bs-btn-padding-y: .5rem; --bs-btn-padding-x: .9rem; --bs-btn-font-size: .72rem; --bs-btn-border-radius: 0; }

.btn-primary,
.btn-dark {
  --bs-btn-color: #fff;
  --bs-btn-bg: #000;
  --bs-btn-border-color: #000;
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: #000;
  --bs-btn-focus-shadow-rgb: 0, 0, 0;
  --bs-btn-active-color: #000;
  --bs-btn-active-bg: #f0f0f0;
  --bs-btn-active-border-color: #000;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #000;
  --bs-btn-disabled-border-color: #000;
}

.btn-outline-primary {
  --bs-btn-color: #000;
  --bs-btn-border-color: #000;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #000;
  --bs-btn-hover-border-color: #000;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #000;
  --bs-btn-active-border-color: #000;
  --bs-btn-disabled-color: #000;
  --bs-btn-disabled-border-color: #000;
}

.btn-outline-secondary {
  --bs-btn-color: #000;
  --bs-btn-border-color: var(--line-strong);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #000;
  --bs-btn-hover-border-color: #000;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #000;
  --bs-btn-active-border-color: #000;
  --bs-btn-disabled-color: var(--muted);
  --bs-btn-disabled-border-color: var(--line);
}

.btn-outline-danger {
  --bs-btn-color: var(--sale);
  --bs-btn-border-color: var(--sale);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--sale);
  --bs-btn-hover-border-color: var(--sale);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--sale);
  --bs-btn-active-border-color: var(--sale);
  --bs-btn-focus-shadow-rgb: 200, 16, 46;
}
.btn-danger {
  --bs-btn-bg: var(--sale);
  --bs-btn-border-color: var(--sale);
  --bs-btn-hover-bg: #a30d25;
  --bs-btn-hover-border-color: #a30d25;
  --bs-btn-active-bg: #a30d25;
  --bs-btn-active-border-color: #a30d25;
}

.btn-light {
  --bs-btn-color: #000;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #000;
  --bs-btn-hover-border-color: #000;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #000;
  --bs-btn-active-border-color: #000;
}

.btn-link {
  --bs-btn-color: #000;
  --bs-btn-hover-color: #000;
  --bs-btn-active-color: #000;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* ---------------- Forms ---------------- */
.form-label { font-size: .82rem; font-weight: 500; letter-spacing: .04em; margin-bottom: .4rem; }
.form-control,
.form-select {
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background-color: var(--paper);
  color: var(--ink);
  padding: .7rem .85rem;
  font-size: .95rem;
}
.form-control-sm, .form-select-sm { padding: .5rem .7rem; font-size: .88rem; }
.form-control::placeholder { color: #9a9a9a; }
.form-control:focus,
.form-select:focus {
  background-color: var(--paper);
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}
.form-control.is-invalid:focus { box-shadow: 0 0 0 1px var(--sale); }
.form-check-input { border-color: #8a8a8a; border-radius: 0; }
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
.form-check-input:focus { border-color: var(--ink); box-shadow: 0 0 0 .2rem rgba(0, 0, 0, .12); }
.form-check-label { color: var(--ink); }
.input-group > .btn { padding-left: 1rem; padding-right: 1rem; }

/* Six-digit verification boxes (shared helper injects its own inline CSS) */
.auth-code-group .auth-code-box { border-radius: 0; border-color: var(--line-strong); color: var(--ink); }
.auth-code-group .auth-code-box:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.auth-dev-code { border-color: var(--ink) !important; color: var(--ink) !important; border-radius: 0 !important; }

/* ---------------- Tables, alerts, pagination, breadcrumb, modals ---------------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); color: var(--ink); }
.table > :not(caption) > * > * { background-color: transparent; color: inherit; border-color: var(--line); padding-top: .9rem; padding-bottom: .9rem; }
.table thead th {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
}

.alert { border-radius: 0; }

.pagination { --bs-pagination-border-radius: 0; gap: 0; }
.page-link {
  color: var(--ink);
  border-color: var(--line);
  border-radius: 0;
  min-width: 42px;
  text-align: center;
  padding: .55rem .8rem;
  font-size: .9rem;
}
.page-link:hover { color: var(--ink); background: var(--paper-alt); border-color: var(--line-strong); }
.page-link:focus { box-shadow: none; color: var(--ink); background: var(--paper-alt); }
.page-item.active .page-link { background: var(--ink); border-color: var(--ink); color: #fff; }

.breadcrumb { --bs-breadcrumb-divider-color: var(--line-strong); --bs-breadcrumb-item-active-color: var(--ink); font-size: .82rem; }
.breadcrumb-item a { color: var(--muted); }
.breadcrumb-item a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.modal-content { border-radius: 0; border: 0; }
.modal-header { border-bottom-color: var(--line); }
.dropdown-menu { border-radius: 0; }

/* Utility to visually hide text but keep it available to screen readers */
.hidden {
  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;
}

/* ---------------- Section headings ---------------- */
.section-title {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--ink);
  font-size: clamp(1.15rem, 3.2vw, 1.6rem);
  line-height: 1.25;
}
.section-subtitle {
  color: var(--muted);
  font-size: clamp(.85rem, 2.4vw, .98rem);
  letter-spacing: .02em;
}

/* Bootstrap's fixed-size heading utilities scale down on small phones */
h1 { font-size: clamp(1.5rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 4.5vw, 2rem); }
h3 { font-size: clamp(1.15rem, 4vw, 1.5rem); }
h4 { font-size: clamp(1.05rem, 3.5vw, 1.3rem); }
.h1, .display-1, .display-2 { font-size: clamp(1.5rem, 5vw, 2.5rem) !important; }
.h2 { font-size: clamp(1.3rem, 4.5vw, 2rem) !important; }
.h3 { font-size: clamp(1.15rem, 4vw, 1.5rem) !important; }
.h4 { font-size: clamp(1.05rem, 3.5vw, 1.3rem) !important; }
.fs-1 { font-size: clamp(1.5rem, 4.5vw, 2.25rem) !important; }
.fs-2 { font-size: clamp(1.3rem, 4vw, 2rem) !important; }
.fs-3 { font-size: clamp(1.15rem, 3.5vw, 1.75rem) !important; }
.fs-4 { font-size: clamp(1.05rem, 3vw, 1.5rem) !important; }
.fs-5 { font-size: clamp(.95rem, 2.5vw, 1.25rem) !important; }

/* No horizontal overflow anywhere */
html, body { max-width: 100%; }

/* ===========================================================
   Announcement strip + header + navigation
   =========================================================== */
.top-strip {
  background: #000;
  color: #fff;
  padding: .55rem 0;
  text-align: center;
  letter-spacing: .06em;
}
.top-strip .container {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-left: 1rem;
  padding-right: 1rem;
  font-size: clamp(.68rem, 2.6vw, .8rem) !important;
  font-weight: 400 !important;
}

.top-strip__viewport { width: 100%; overflow: hidden; }
.top-strip__track { display: flex; width: 100%; --v: 1; }
.top-strip__item {
  flex: 0 0 calc(100% / var(--v));
  padding: 0 .5rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.is-scrolled .site-header { box-shadow: 0 8px 22px -14px rgba(0, 0, 0, .35); }

.navbar {
  --bs-navbar-padding-y: 0;
  --bs-navbar-padding-x: 0;
  --bs-navbar-nav-link-padding-x: .15rem;
  padding: 0 !important;
  background: var(--paper) !important;
  border: 0;
  box-shadow: none !important;
}
.navbar > .container { padding-top: 0; padding-bottom: 0; }

.navbar-brand {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}
.navbar-brand img,
.desktop-brand img,
.mobile-nav-row .navbar-brand img {
  display: block;
  width: auto;
  max-width: 55vw;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.navbar-brand.brand-text { font-size: clamp(1.25rem, 5vw, 1.6rem); letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }

/* ---- Icon buttons (account, cart, search) ---- */
.nav-action,
.cart-icon-link,
.nav-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--ink) !important;
  background: transparent;
  border-radius: 0;
  transition: opacity .2s ease;
}
.nav-action:hover,
.cart-icon-link:hover,
.nav-icon-button:hover { opacity: .55; background: transparent; }

.svg-wrapper { display: inline-block; line-height: 0; }
.svg-wrapper svg { width: 23px; height: 23px; display: block; vertical-align: middle; }
.svg-wrapper svg path,
.account-button__icon path { stroke-width: 1.25px; }
.account-button__icon { width: 19px; height: 21px; vertical-align: middle; display: inline-block; }

#cartCountBadge,
#cartCountBadgeMobile {
  top: 9px !important;
  left: calc(100% - 7px) !important;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background-color: var(--ink) !important;
  color: #fff !important;
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--paper);
}

/* Cart add animation: pop the cart icon and badge when an item is added */
@keyframes cart-icon-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.28); }
  60% { transform: scale(0.98); }
  100% { transform: scale(1); }
}
.cart-icon-link.cart-added .svg-wrapper {
  animation: cart-icon-pop 520ms cubic-bezier(.2, .8, .2, 1);
  transform-origin: center center;
}
@keyframes cart-badge-pop {
  0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.badge-pop {
  animation: cart-badge-pop 520ms cubic-bezier(.2, .8, .2, 1);
  transform-origin: center center;
}

/* ---- Search toggle ---- */
.nav-search-toggle {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
  transition: opacity .2s ease;
}
.nav-search-toggle i { font-size: 1.15rem; line-height: 1; }
.nav-search-toggle:hover { opacity: .55; }
.nav-search-toggle.active { opacity: .55; }

/* ---- Menu links ---- */
.navbar-nav .nav-link {
  position: relative;
  padding: 1rem .15rem;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink) !important;
  white-space: nowrap;
}
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: .15rem;
  right: .15rem;
  bottom: .7rem;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after,
.navbar-nav .nav-link.show::after { transform: scaleX(1); }
.navbar-nav .dropdown-toggle::after {
  /* the caret Bootstrap draws is a border trick; keep it, but make it quiet */
  position: static;
  height: 0;
  width: 0;
  background: transparent;
  transform: none;
  margin-left: .5em;
  vertical-align: .18em;
  border-top: .32em solid;
  border-right: .32em solid transparent;
  border-left: .32em solid transparent;
}
.navbar-nav .dropdown-toggle:hover::after { transform: none; }

/* ---- Categories mega menu (desktop) ---- */
.category-dropdown-menu { display: none; }
.navbar .category-dropdown-menu.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  margin: 0;
  max-height: 70vh;
  overflow-y: auto;
  padding: 1.75rem max(24px, calc((100% - 1296px) / 2)) 2rem;
  background: var(--paper);
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 22px 30px -22px rgba(0, 0, 0, .28);
}
.navbar .category-dropdown-menu.dropdown-menu.show {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .25rem 2rem;
}
.category-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .55rem .4rem;
  border-radius: 0;
  font-size: .95rem;
  white-space: normal;
  color: var(--ink);
  background: transparent;
}
.category-dropdown-menu .dropdown-item:hover,
.category-dropdown-menu .dropdown-item:focus { background: var(--paper-alt); color: var(--ink); }
.category-dropdown-menu .dropdown-item.active { background: transparent; color: var(--ink); font-weight: 600; }
.category-dropdown-thumb {
  width: 44px;
  height: 56px;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 0;
  flex-shrink: 0;
  background: var(--paper-alt);
}

/* Mobile: category submenu that expands inline inside the slide-down nav */
.mobile-category-list { margin-top: .25rem; }
.mobile-category-list .nav-link {
  padding-top: .7rem;
  padding-bottom: .7rem;
  font-weight: 400;
  font-size: .92rem;
  letter-spacing: .04em;
  text-transform: none;
}

/* ---- Mobile header row: menu + search | logo | account + cart ---- */
.mobile-nav-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 78px;
  gap: .75rem;
}
.mobile-nav-left,
.mobile-nav-actions {
  display: flex;
  align-items: center;
  gap: .1rem;
  flex-shrink: 0;
  z-index: 2;
}
.navbar-toggler {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none !important;
}
.navbar-toggler-icon {
  width: 1.4rem;
  height: 1.4rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='1.6' d='M4 8h22M4 15h22M4 22h22'/%3e%3c/svg%3e");
}
.mobile-nav-row .navbar-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 50%;
  z-index: 1;
}
.mobile-nav-row .navbar-brand img { height: 62px; max-width: 100%; }
.mobile-nav-row .nav-search-toggle { width: 40px; height: 40px; justify-content: center; }
.mobile-nav-actions .cart-icon-link { font-size: 1.1rem; }

@media (max-width: 991.98px) {
  #mainNav {
    margin: 0 -12px;
    padding: 0 12px;
    border-top: 1px solid var(--line);
    background: var(--paper);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }
  .navbar-nav { margin: 0 !important; padding: 0 0 1rem; gap: 0 !important; }
  .navbar-nav .nav-link {
    padding: 1rem 0;
    font-size: .85rem;
    border-bottom: 1px solid var(--line);
  }
  .navbar-nav .nav-link::after { display: none; }
  .mobile-category-list { padding-left: 1rem !important; margin-bottom: 0; }
  .mobile-category-list .nav-link { border-bottom: 1px solid var(--line); }
}

/* ---- Desktop: search | centred logo | account + cart, menu on its own row ---- */
@media (min-width: 992px) {
  .navbar > .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "search brand actions"
      "menu   menu  menu";
    align-items: center;
  }
  .mobile-nav-row { display: none !important; }
  .navbar-expand-lg .navbar-collapse { display: contents !important; }

  .desktop-brand {
    grid-area: brand;
    justify-self: center;
    padding: .7rem 0 .45rem;
  }
  .desktop-brand img { height: 78px; max-width: 240px; }

  #navSearchToggle { grid-area: search; justify-self: start; }
  .nav-actions { grid-area: actions; justify-self: end; display: flex; align-items: center; gap: .35rem; }

  .navbar-nav {
    grid-area: menu;
    justify-self: center;
    flex-direction: row;
    gap: 2.6rem !important;
    margin: 0 !important;
  }
  .navbar-nav .dropdown { position: static; }
}
@media (min-width: 992px) and (hover: hover) {
  .navbar .navbar-nav .dropdown:hover > .category-dropdown-menu.dropdown-menu {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .25rem 2rem;
  }
  .navbar-nav .dropdown:hover > .nav-link::after { transform: scaleX(1); }
}

/* ===========================================================
   Full-page search overlay
   =========================================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  visibility: hidden;
  pointer-events: none;
}
.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  transition: opacity .28s ease;
}
.search-overlay-panel {
  position: fixed;
  left: 50%;
  top: 0;
  transform: translate(-50%, -110%);
  width: 100%;
  max-width: 980px;
  max-height: 100vh;
  overflow-y: auto;
  background: var(--paper);
  padding: 2.5rem 1.5rem 2.25rem;
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .35);
  opacity: 0;
  transition: transform .38s cubic-bezier(.22, 1, .22, 1), opacity .24s ease;
  z-index: 2100;
}
.search-overlay.active { visibility: visible; pointer-events: auto; }
body.search-sheet-open .whatsapp-float { display: none; }
.search-overlay.active .search-overlay-backdrop { opacity: 1; }
.search-overlay.active .search-overlay-panel { transform: translate(-50%, 0); opacity: 1; }

.search-overlay-close {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity .2s ease;
}
.search-overlay-close:hover { opacity: .5; }

.search-overlay-form {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: .85rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: .8rem;
}
.search-overlay-icon { font-size: 1.35rem; color: var(--ink); flex-shrink: 0; }
.search-overlay-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.6vw, 1.55rem);
  font-weight: 300;
  color: var(--ink);
}
.search-overlay-input::placeholder { color: #a0a0a0; }
.search-overlay-submit {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  padding: .65rem 1.6rem;
  border-radius: 0;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.search-overlay-submit:hover { background: var(--paper); color: var(--ink); }
.search-overlay-hint { max-width: 760px; margin: .9rem auto 0; text-align: right; color: var(--muted); font-size: .8rem; }
.search-overlay-hint kbd { background: var(--paper-alt); color: var(--ink); border: 1px solid var(--line); border-radius: 0; padding: .1rem .4rem; font-size: .75rem; }

.search-overlay-clear {
  border: 0;
  background: transparent;
  color: #a0a0a0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: .25rem;
  transition: color .15s ease, transform .15s ease;
}
.search-overlay-clear:hover { color: var(--ink); }
.search-overlay-clear:active { transform: scale(.88); }

/* recently viewed + live results */
.search-overlay-results { max-width: 900px; margin: 1.75rem auto 0; }
.search-results-section + .search-results-section { margin-top: 1.9rem; }
.search-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .9rem;
}
.search-results-heading h6 {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.search-recent-clear {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.search-recent-clear:hover { color: var(--ink); }

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem 1rem;
}
.search-results-loading {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 0;
}
.search-empty-msg { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; margin: 0; padding: .5rem 0; }
.search-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .4rem;
  padding: 2.75rem 1rem;
  color: var(--muted);
}
.search-empty-state i { font-size: 2rem; color: var(--line-strong); margin-bottom: .25rem; }
.search-empty-state .search-empty-msg { padding: 0; font-size: .95rem; font-weight: 500; color: var(--ink); }
.search-empty-state .search-empty-hint { font-size: .82rem; color: var(--muted); }

.search-result-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  text-decoration: none;
  color: inherit;
}
.search-result-thumb { width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: var(--paper-alt); }
.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
  transition: transform .4s ease;
}
.search-result-card:hover .search-result-thumb img { transform: scale(1.04); }
.search-result-info { display: flex; flex-direction: column; gap: .15rem; }
.search-result-name {
  color: var(--ink);
  font-size: .86rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-result-price { color: var(--ink); font-weight: 500; font-size: .86rem; display: flex; align-items: baseline; gap: .4rem; }
.search-result-old-price { color: var(--muted); font-weight: 400; font-size: .76rem; }

/* Inline live nav search dropdown */
.nav-live-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px;
  z-index: 1200;
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .35);
  max-height: 60vh;
  overflow: auto;
}
.nav-live-results .search-result-card { flex-direction: row; gap: 12px; align-items: center; padding: 8px; }
.nav-live-results .search-result-thumb { width: 56px; height: 72px; aspect-ratio: auto; }
.nav-live-results .search-result-name { font-size: .95rem; color: var(--ink); }
.nav-live-results p.search-empty-msg { margin: 0; color: var(--muted); }

@media (min-width: 992px) {
  .search-overlay-panel .nav-live-results { left: auto; right: 0; width: 420px; }
}

@media (max-width: 575.98px) {
  .search-overlay-results { margin-top: 1.1rem; }
  .search-results-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
}

/* Phones: full-screen, app-style search sheet */
@media (max-width: 575.98px) {
  .search-overlay-backdrop { background: rgba(0, 0, 0, .4); }
  body.search-sheet-open .top-strip { display: none; }

  .search-overlay-panel {
    position: fixed;
    inset: 0;
    left: 0;
    top: 0;
    transform: translateY(-100%);
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    box-shadow: none;
    overflow: hidden;
    transition: transform .32s cubic-bezier(.22, 1, .22, 1);
    z-index: 2200;
  }
  .search-overlay.active .search-overlay-panel { transform: translateY(0); opacity: 1; }

  .search-overlay-form {
    order: -1;
    position: sticky;
    top: 0;
    z-index: 5;
    width: 100%;
    max-width: none;
    display: flex;
    align-items: center;
    gap: .55rem;
    background: var(--paper);
    padding: calc(.85rem + env(safe-area-inset-top, 0px)) .85rem .85rem 3.4rem;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    flex-wrap: nowrap;
    min-height: 62px;
  }
  .search-overlay-icon { display: none; }
  .search-overlay-input {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    color: var(--ink);
    background: var(--paper-alt);
    padding: .68rem .9rem;
  }
  .search-overlay-clear { order: 1; font-size: 1.15rem; }
  .search-overlay-submit {
    order: 2;
    flex-shrink: 0;
    padding: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
  }
  .search-overlay-close {
    position: fixed;
    top: calc(.7rem + env(safe-area-inset-top, 0px));
    left: .65rem;
    right: auto;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    z-index: 6;
  }
  .search-overlay-hint { display: none; }

  .search-overlay-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    max-width: none;
    margin: 0;
    padding: 1rem .9rem 2rem;
  }
  .search-results-grid { display: flex; flex-direction: column; gap: 0; }
  .search-results-grid .search-result-card {
    flex-direction: row;
    align-items: center;
    gap: .9rem;
    padding: .65rem .1rem;
    border-bottom: 1px solid var(--line);
  }
  .search-results-grid .search-result-card:active { background: var(--paper-alt); }
  .search-results-grid .search-result-thumb { width: 58px; height: 74px; aspect-ratio: auto; flex-shrink: 0; }
  .search-results-grid .search-result-info { flex: 1; min-width: 0; gap: .25rem; }
  .search-results-grid .search-result-name { font-size: .9rem; -webkit-line-clamp: 1; }
  .search-empty-state { padding: 3.5rem 1rem; }
  /* the sheet already lists live results, so the floating dropdown would duplicate it */
  .search-overlay-panel .nav-live-results { display: none !important; }
}

/* ===========================================================
   Homepage: hero, feature strip, category tiles, promo
   =========================================================== */
.homepage-content { display: flex; flex-direction: column; }
.homepage-content .features-band { order: 0; }

.hero-slider { position: relative; overflow: hidden; background: #fff; }
/* Each slide takes the exact shape of its own picture: the image is shown at full
   width with its natural height, so it is NEVER cropped and there is NEVER a blurred
   bar on any side - on phones, tablets, laptops and big screens. main.js smoothly
   animates the slider height when two pictures have different shapes. */
.hero-slider .carousel-inner { transition: height .45s ease; }
.hero-slide {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #efe9dc;               /* only visible for a split second while an image loads */
  min-height: 140px;
}
.hero-slide-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: none;
}
.hero-slide.has-content::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .12) 55%, rgba(0, 0, 0, 0) 100%);
}
.hero-slide > .container { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; }
.hero-slide-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 620px;
  padding: 0 0 clamp(2.5rem, 6vw, 4rem);
}
.hero-slide-content h1 {
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-slide-content p { font-size: clamp(.95rem, 1.8vw, 1.1rem); font-weight: 300; opacity: .95; letter-spacing: .03em; }

.carousel-indicators { margin-bottom: 1.1rem; gap: 0; }
.carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  margin: 0 5px;
  border: 0;
  border-radius: 50%;
  background-color: #fff;
  opacity: .5;
}
.carousel-indicators .active { opacity: 1; }
.hero-arrow {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #000;
  font-size: 1.05rem;
  transition: background-color .2s ease, color .2s ease;
}
.carousel-control-prev, .carousel-control-next { width: 8%; min-width: 64px; opacity: 1; }
/* Phones: picture stays fully visible at its own shape. */
@media (max-width: 767.98px) {
  .hero-slide { min-height: 0; }
  .hero-slide-content { max-width: 100%; padding-bottom: 1.9rem; }
  .hero-slide-content h1 { font-size: clamp(1.05rem, 5.2vw, 1.5rem); margin-bottom: .4rem; }
  .hero-slide-content p { font-size: .85rem; margin-bottom: .6rem !important; }
  .hero-slide-content .btn { padding: .35rem .95rem; font-size: .8rem; }
  .carousel-indicators { margin-bottom: .55rem; }
  .carousel-indicators [data-bs-target] { width: 10px; }
}
@media (max-width: 400px) {
  .hero-slide-content p { display: none; }
}

.carousel-control-prev:hover .hero-arrow, .carousel-control-next:hover .hero-arrow { background: #000; color: #fff; }
@media (max-width: 767.98px) {
  .carousel-control-prev, .carousel-control-next { display: none; }
}

/* Feature strip */
.features-band { background: var(--paper); border-bottom: 1px solid var(--line); }
.features-band .feature-box {
  background: transparent;
  padding: 1.6rem 1rem;
  height: 100%;
  position: relative;
  text-align: center;
}
.features-band .row > div:not(:last-child) .feature-box::after {
  content: "";
  position: absolute;
  top: 22%;
  bottom: 22%;
  right: 0;
  width: 1px;
  background: var(--line);
}
.feature-box .icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin: 0 auto .6rem;
  font-size: 1.5rem;
  background: transparent;
  color: var(--ink);
}
.feature-box h6 { font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .3rem; }
.feature-box p { color: var(--muted); }
@media (max-width: 767.98px) {
  .homepage-content .features-band { order: 99; }
  .features-band .row { flex-wrap: nowrap; }
  .features-band .row > div { flex: 1 1 0; width: auto; max-width: none; }
  .features-band .feature-box { padding: 1.25rem .35rem; }
  .features-band .feature-box h6 { font-size: .64rem; line-height: 1.25; letter-spacing: .08em; }
  .features-band .feature-box p { font-size: .7rem; line-height: 1.3; }
  .features-band .row > div:not(:last-child) .feature-box::after { display: none; }
}

/* Category tiles */
.category-card { display: block; color: var(--ink); }
.category-media { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-alt); }
.category-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
  transition: transform .6s ease;
}
.category-card:hover .category-media img { transform: scale(1.04); }
.category-label {
  display: block;
  margin-top: .8rem;
  text-align: center;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* Promo band */
.promo-banner {
  background: var(--paper-alt);
  color: var(--ink);
  padding: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.promo-banner h2 { text-transform: uppercase; letter-spacing: .14em; font-weight: 500; }

/* Newsletter block (kept for reuse) */
.newsletter-section { background: var(--paper-alt); color: var(--ink); border: 1px solid var(--line); }

/* ===========================================================
   Product cards
   =========================================================== */
.product-card, .product-card-compact { display: flex; flex-direction: column; height: 100%; background: transparent; border: 0; }
.product-thumb, .product-compact-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper-alt);
}
.product-thumb-link, .product-compact-thumb { display: block; width: 100%; height: 100%; }
.product-thumb img, .product-compact-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
  transition: transform .6s ease;
}
.product-card:hover .product-thumb img,
.product-card-compact:hover .product-compact-thumb img { transform: scale(1.035); }
.product-card.is-soldout .product-thumb img { opacity: .5; }

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: .32rem .6rem;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 0;
  box-shadow: none;
}
.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--ink);
  font-size: .64rem;
  padding: .3rem .55rem;
  text-transform: uppercase;
}

.quick-add-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  letter-spacing: 0;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.quick-add-btn:hover { background: #000; color: #fff; border-color: #000; }
.quick-add-btn:disabled { opacity: .45; cursor: not-allowed; }

.product-info, .product-compact-info { padding-top: .75rem; }
.product-title { margin: 0 0 .3rem; font-size: .95rem; font-weight: 400; line-height: 1.35; min-height: 0; letter-spacing: .01em; }
.product-title a, .product-compact-name { color: var(--ink); }
.product-compact-name {
  display: block;
  font-size: .95rem;
  margin-bottom: .3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-title a:hover, .product-compact-name:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.product-price, .product-compact-price { font-size: .95rem; }
.product-price .fw-bold, .product-compact-price .fw-bold { font-weight: 500 !important; }
.price-sale { color: var(--sale) !important; }
.text-decoration-line-through { color: var(--muted); }

.product-grid { --bs-gutter-x: .75rem; --bs-gutter-y: 1.75rem; }
@media (min-width: 768px) { .product-grid { --bs-gutter-x: 1rem; --bs-gutter-y: 2.25rem; } }

@media (max-width: 575.98px) {
  .product-title, .product-compact-name { font-size: .82rem; }
  .product-price, .product-compact-price { font-size: .84rem; }
  .discount-badge { top: 6px; left: 6px; padding: .25rem .45rem; font-size: .58rem; }
  .stock-badge { top: 6px; right: 6px; font-size: .56rem; padding: .25rem .4rem; }
  .quick-add-btn { width: 34px; height: 34px; font-size: .9rem; right: 8px; bottom: 8px; }
}

/* Related products slider */
.product-slider {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  margin: 0 -4px;
  padding: 4px;
}
.product-slider::-webkit-scrollbar { display: none; }
.product-slider-track { display: flex; flex-wrap: nowrap !important; }
.product-slider-track > [class*="col-"] { flex: 0 0 auto !important; width: 68% !important; scroll-snap-align: start; }
@media (min-width: 480px) { .product-slider-track > [class*="col-"] { width: 46% !important; } }
@media (min-width: 768px) { .product-slider-track > [class*="col-"] { width: 32% !important; } }
@media (min-width: 992px) { .product-slider-track > [class*="col-"] { width: 24% !important; } }
@media (min-width: 1200px) { .product-slider-track > [class*="col-"] { width: 19.5% !important; } }
.slider-arrow-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background .2s ease, color .2s ease;
}
.slider-arrow-btn:hover { background: #000; color: #fff; }
.slider-arrow-btn:disabled { opacity: .3; cursor: default; background: #fff; color: var(--ink); }
@media (max-width: 575.98px) { .related-products-section .section-title { font-size: 1.05rem; } }

/* ===========================================================
   Footer
   =========================================================== */
.site-footer {
  background: var(--paper) !important;
  color: var(--ink);
  border-top: 1px solid var(--line);
}
.site-footer h6 { font-weight: 600; }
.footer-link { color: #555; text-decoration: none; }
.footer-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: .78rem;
  letter-spacing: .16em;
}
.footer-accordion-toggle i { display: none; }
.site-footer h6.text-uppercase { font-size: .78rem; letter-spacing: .16em; }
.footer-social a {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 1rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.footer-social a:hover { background: #000; color: #fff; border-color: #000; }
.footer-newsletter-form .form-control { min-height: 48px; }
.footer-newsletter-form .btn { min-height: 48px; }
.site-footer .col-12.col-lg-4 { margin-top: .75rem; }

@media (min-width: 992px) {
  .footer-accordion-content.collapse { display: block !important; height: auto !important; visibility: visible; }
}
@media (max-width: 991.98px) {
  .site-footer .row { row-gap: 0 !important; }
  .footer-column { border-bottom: 1px solid var(--line); padding-top: .95rem; padding-bottom: .95rem; }
  .footer-accordion-toggle { margin-bottom: 0 !important; }
  .footer-accordion-toggle i { display: block; font-size: .95rem; }
  .footer-accordion-toggle[aria-expanded="true"] i::before { content: "\f2ea"; }
  .footer-accordion-content { padding: .5rem 0 .2rem; }
  .site-footer .col-12.col-lg-4 { margin-top: 1.9rem; min-width: 0; }
  .footer-newsletter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: .5rem;
    margin-left: 0;
    margin-right: 0;
  }
  .footer-newsletter-form > .col-12 { width: auto; padding: 0; }
  .footer-newsletter-form .form-control,
  .footer-newsletter-form .btn { font-size: .78rem; }
}

/* WhatsApp floating button */
.whatsapp-float { position: fixed; right: 18px; bottom: 24px; z-index: 1090; }
.whatsapp-float a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  border: 3px solid #fff;
  transition: transform .15s ease;
}
.whatsapp-float a:hover { transform: translateY(-3px); color: #fff; }
.whatsapp-float .wa-icon { font-size: 1.3rem; }
@media (max-width: 575.98px) {
  .whatsapp-float { right: 12px; bottom: 18px; }
  .whatsapp-float a { width: 48px; height: 48px; }
  .whatsapp-float .wa-icon { font-size: 1.05rem; }
}

/* ===========================================================
   Shop filters
   =========================================================== */
.filter-card { border: 1px solid var(--line); background: var(--paper); overflow: hidden; }
.filter-card .form-check-label { cursor: pointer; }
.filter-card-body { padding: 1.5rem; }
.filter-card h6 { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.filter-toggle-btn { border-radius: 0; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.filter-toggle-icon { transition: transform .2s ease; }
.filter-toggle-btn[aria-expanded="true"] .filter-toggle-icon { transform: rotate(180deg); }
@media (max-width: 991.98px) {
  .filter-toggle-btn { border-bottom: 1px solid var(--line); }
}

/* ---------- Shop toolbar: Filter | Sort ............ view buttons ---------- */
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.shop-toolbar-left { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.shop-filter-btn, .shop-sort-btn {
  height: 44px; display: inline-flex; align-items: center; gap: .5rem; padding: 0 1rem;
  font-family: inherit; font-size: .9rem; font-weight: 500; border-radius: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.shop-filter-btn { background: #000; color: #fff; border: 1px solid #000; }
.shop-filter-btn i { font-size: 1rem; }
.shop-filter-btn:hover { background: #222; }
.shop-filter-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #fff; color: #000;
  font-size: .68rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.shop-sort-btn { background: #fff; color: var(--ink); border: 1px solid var(--ink); justify-content: space-between; }
.shop-sort-btn i { font-size: .75rem; transition: transform .2s ease; }
.shop-sort-btn[aria-expanded="true"] i { transform: rotate(180deg); }
.shop-sort-value { font-weight: 500; }
.shop-sort-menu { min-width: 220px; margin-top: .35rem !important; padding: .35rem 0; border: 1px solid var(--line-strong); border-radius: 0; box-shadow: 0 14px 30px rgba(0,0,0,.14); }
.shop-sort-menu .dropdown-item { padding: .6rem 1rem; font-size: .9rem; }
.shop-sort-menu .dropdown-item.active, .shop-sort-menu .dropdown-item:active { background: var(--ink); color: #fff; }

.shop-view-toggle { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
.shop-view-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: #b5b5b5; font-size: 1.3rem; cursor: pointer;
  transition: color .15s ease; -webkit-tap-highlight-color: transparent;
}
.shop-view-btn:hover { color: #666; }
.shop-view-btn.active { color: #000; }

@media (max-width: 575.98px) {
  .shop-toolbar { gap: .4rem; }
  .shop-toolbar-left { gap: .4rem; }
  .shop-filter-btn, .shop-sort-btn { height: 42px; padding: 0 .8rem; font-size: .84rem; }
  .shop-sort-btn { gap: .35rem; }
  .shop-view-btn { width: 34px; font-size: 1.15rem; }
  .shop-sort-menu { min-width: 200px; }
}
@media (max-width: 380px) {
  .shop-sort-btn > span:first-child { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- Active chips ---------- */
.shop-active { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1.25rem; }
.shop-chip { display: inline-flex; align-items: center; gap: .6rem; padding: .55rem .9rem; background: var(--paper-alt); color: var(--ink-soft); font-size: .88rem; }
.shop-chip button { border: 0; background: none; padding: 0; color: var(--ink); font-size: .75rem; line-height: 1; cursor: pointer; }
.shop-chip-clear { border: 0; background: #000; color: #fff; padding: .55rem 1rem; font-size: .88rem; cursor: pointer; }

/* ---------- Slide-in filter drawer ---------- */
.shop-drawer { --bs-offcanvas-width: min(86vw, 380px); border-right: 0; }
.shop-drawer .offcanvas-header { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.shop-drawer .offcanvas-title { font-size: .85rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.shop-drawer .offcanvas-body { padding: 0 1.25rem; }
.shop-drawer-section { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.shop-drawer-section:last-child { border-bottom: 0; }
.shop-drawer-section h6 { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; margin-bottom: .9rem; }
.shop-cat-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.shop-cat-option { cursor: pointer; margin: 0; }
.shop-cat-option input { position: absolute; opacity: 0; pointer-events: none; }
.shop-cat-option span { display: inline-block; padding: .5rem .95rem; border: 1px solid var(--line-strong); font-size: .86rem; transition: all .15s ease; }
.shop-cat-option:hover span { border-color: var(--ink); }
.shop-cat-option input:checked + span { background: #000; border-color: #000; color: #fff; }
.shop-cat-option input:focus-visible + span { outline: 2px solid #000; outline-offset: 2px; }
.shop-sale-row { display: flex; align-items: center; justify-content: space-between; margin: 0; cursor: pointer; font-size: .95rem; }
.shop-sale-row .form-check-input { width: 2.6em; height: 1.35em; cursor: pointer; }
.shop-sale-row .form-check-input:checked { background-color: #000; border-color: #000; }
.shop-drawer .form-control { border-radius: 0; height: 44px; }
.shop-drawer .form-control:focus { border-color: #000; box-shadow: none; }
.shop-drawer-footer {
  display: flex; gap: .75rem; padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); background: #fff;
}
.shop-drawer-footer .btn { flex: 1; height: 48px; border-radius: 0; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 500; }
.shop-drawer-footer .btn-dark { flex: 1.6; }

/* ---------- Results layouts ---------- */
.shop-results { transition: opacity .2s ease; }
/* Large view: one big photo per row on phones, two per row on larger screens */
.shop-results.view-large .product-grid > [class*="col-"] { flex: 0 0 auto; width: 100%; }
@media (min-width: 768px) {
  .shop-results.view-large .product-grid > [class*="col-"] { width: 50%; }
}
.shop-results.view-large .product-thumb { aspect-ratio: 3 / 4; }
.shop-results.view-large .product-title { font-size: 1.05rem; }
.shop-results.view-large .product-price { font-size: 1.05rem; }

/* ===========================================================
   Product page
   =========================================================== */
.product-gallery-main { position: relative; overflow: hidden; background: var(--paper-alt); }
.main-product-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  background: var(--paper-alt);
  display: block;
  transition: opacity .22s ease;
}
.main-product-image.is-swapping { opacity: 0; }

.gallery-zoom-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #000;
  transition: background .2s ease, color .2s ease;
}
.gallery-zoom-btn:hover { background: #000; color: #fff; }

.gallery-thumb-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
.gallery-thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  border: 1px solid transparent;
  cursor: pointer;
  opacity: .65;
  transition: opacity .2s ease, border-color .2s ease;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: #000; opacity: 1; }
@media (max-width: 575.98px) {
  .gallery-thumb-row { gap: .4rem; }
  .gallery-zoom-btn { width: 34px; height: 34px; font-size: .8rem; right: 10px; bottom: 10px; }
}

.gallery-zoom-modal .modal-content { background: transparent; border: none; }
.gallery-zoom-modal .modal-body { display: flex; align-items: center; justify-content: center; }
.gallery-zoom-modal img { max-width: 100%; max-height: 85vh; }
.gallery-zoom-modal .modal-dialog { margin: .75rem auto; max-width: min(96vw, 1000px); }
/* Close (X) button: pinned to the screen corner, always visible on phones too */
.gallery-zoom-close {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 1065;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #000;
  font-size: 1.05rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gallery-zoom-close:hover { background: #000; color: #fff; }
.gallery-zoom-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gallery-zoom-modal img { object-fit: contain; }

.qty-selector { max-width: 140px; }
.qty-selector .btn { padding-left: .75rem; padding-right: .75rem; }

.size-chart-link { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.size-option { min-width: 46px; height: 42px; padding: .35rem .8rem; border-radius: 0; font-weight: 500; line-height: 1; letter-spacing: .04em; }
.size-option.is-unavailable {
  color: #a8a8a8 !important;
  border-color: var(--line) !important;
  text-decoration: line-through;
  opacity: .8;
  cursor: not-allowed;
}
.size-chart-modal-content { border: 0; border-radius: 0; overflow: hidden; }
.size-chart-image { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; }

/* Buy Now sits beside Add to Cart: outlined so the two read as primary/secondary */
.btn.buy-now-btn {
  --bs-btn-color: #000;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #000;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #000;
  --bs-btn-hover-border-color: #000;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #000;
  --bs-btn-disabled-color: #000;
  --bs-btn-disabled-bg: #fff;
  --bs-btn-disabled-border-color: #000;
}

/* ===========================================================
   Cart & checkout
   =========================================================== */
.cart-item-thumb { width: 84px; height: 108px; object-fit: cover; object-position: 50% 20%; background: var(--paper-alt); }
.cart-mobile-list { display: flex; flex-direction: column; }
.cart-mobile-item { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.cart-mobile-item:first-child { padding-top: 0; }
.cart-mobile-item .min-w-0 { min-width: 0; }
.cart-mobile-item-name { overflow: hidden; text-overflow: ellipsis; }
.cart-mobile-item-price { font-size: .95rem; }
.cart-mobile-item .qty-selector { max-width: 130px; }
.cart-mobile-item .qty-selector .form-control { padding: .375rem .25rem; }
.cart-mobile-remove-btn { width: 42px; height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
@media (max-width: 575.98px) { .cart-item-thumb { width: 72px; height: 92px; } }

.order-summary-thumb { width: 44px; height: 56px; object-fit: cover; object-position: 50% 20%; background: var(--paper-alt); flex-shrink: 0; }
.order-summary-card { border: 1px solid var(--line); position: sticky; top: 150px; }
.mobile-checkout-summary-toggle { min-height: 52px; color: var(--ink) !important; text-transform: none; letter-spacing: .02em; text-decoration: none; }
.mobile-checkout-summary-icon { font-size: .9rem; transition: transform .2s ease; color: var(--ink); }
.mobile-checkout-summary-toggle[aria-expanded="true"] .mobile-checkout-summary-icon { transform: rotate(180deg); }
.checkout-place-order-btn, .cart-proceed-btn { min-height: 50px; line-height: 1.2; }
@media (max-width: 575.98px) {
  .checkout-place-order-btn, .cart-proceed-btn { min-height: 46px; font-size: .8rem; }
}

/* Remove-from-cart confirmation */
body.cart-modal-open { overflow: hidden; }
.cart-remove-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
}
.cart-remove-modal.is-visible { visibility: visible; opacity: 1; }
.cart-remove-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.cart-remove-dialog {
  position: relative;
  width: min(100%, 430px);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  transform: translateY(10px);
  transition: transform .2s ease;
}
.cart-remove-modal.is-visible .cart-remove-dialog { transform: translateY(0); }
.cart-remove-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.cart-remove-close:hover { color: var(--ink); }
.cart-remove-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--sale);
  background: #fbe9ec;
  font-size: 1.5rem;
}
.cart-remove-dialog h5 { margin-bottom: .5rem; color: var(--ink); }
.cart-remove-dialog p { margin-bottom: 1.5rem; color: var(--muted); }
.cart-remove-actions { display: flex; gap: .75rem; }
.cart-remove-actions .btn { flex: 1; min-height: 2.8rem; }
@media (max-width: 420px) {
  .cart-remove-modal { padding: .75rem; }
  .cart-remove-actions { flex-direction: column-reverse; }
  .cart-remove-actions .btn { width: 100%; }
}

/* ===========================================================
   Order tracking, empty states, invoice
   =========================================================== */
.tracking-timeline { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.tracking-timeline li { flex: 1 1 0; text-align: center; position: relative; padding-top: 40px; min-width: 100px; }
.tracking-timeline li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.tracking-timeline li:first-child::before { display: none; }
.tracking-timeline li.done::before { background: #000; }
.tracking-timeline .dot {
  width: 28px; height: 28px; border-radius: 50%; background: var(--line); color: #fff;
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 1; font-size: .8rem;
}
.tracking-timeline li.done .dot, .tracking-timeline li.active .dot { background: #000; color: #fff; }
.tracking-timeline li.cancelled .dot { background: var(--sale); }

.empty-state { padding: 4rem 1rem; text-align: center; color: var(--muted); }
.empty-state i { font-size: 3.2rem; color: var(--line-strong); }
.empty-state h5, .empty-state h6 { color: var(--ink); }
.rating-stars { color: var(--ink); }
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 37%, #f0f0f0 63%); background-size: 400% 100%; animation: skeleton-loading 1.4s ease infinite; }
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.invoice-card { max-width: 760px; background: #fff; color: var(--ink); border: 1px solid var(--line); padding: clamp(1.5rem, 4vw, 2.75rem); }
.invoice-table thead th { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.invoice-table td, .invoice-table th { padding: .75rem .5rem; }
.invoice-totals { max-width: 320px; font-size: .95rem; }
.invoice-totals > div { padding: .2rem 0; color: var(--ink-soft); }
.invoice-grand-total { font-size: 1.2rem; font-weight: 600; color: var(--ink) !important; }
.invoice-thanks { font-style: italic; }

.order-success-page { max-width: 920px; }
.order-success-logo { display: flex; justify-content: center; padding: 1.25rem 1rem 0; }
.order-success-logo a { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; color: var(--ink); text-decoration: none; font-size: 1.35rem; font-weight: 600; }
.order-success-logo img { display: block; width: auto; max-width: min(220px, 70vw); height: auto; max-height: 60px; object-fit: contain; }
.order-success-intro { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 1rem; max-width: 760px; margin-inline: auto; }
.order-success-intro .order-success-check { grid-row: span 2; width: 68px; height: 68px; }
.order-success-copy { min-width: 0; }
.order-confirmation-number { margin: 0 0 .2rem; color: var(--muted); font-size: .9rem; }
.order-success-copy h2 { margin: 0 0 .35rem; color: var(--ink); font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 600; }
.order-success-copy > p:last-child { margin: 0; color: var(--ink-soft); }
.order-success-check { width: 96px; height: 96px; margin: 0 auto; }
.order-success-check svg { width: 100%; height: 100%; overflow: visible; }
.order-success-check__circle {
  fill: none; stroke: #000; stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 283; stroke-dashoffset: 283; transform-origin: center; transform: rotate(-90deg);
  animation: order-success-circle .6s ease-out forwards;
}
.order-success-check__mark {
  fill: none; stroke: #000; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60; animation: order-success-draw .45s ease-out .55s forwards;
}
@keyframes order-success-circle { to { stroke-dashoffset: 0; } }
@keyframes order-success-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 480px) { .order-success-check { width: 72px; height: 72px; } }
@media (max-width: 575.98px) {
  .order-success-page { padding-top: 1.5rem !important; }
  .order-success-logo { padding-top: 1rem; }
  .order-success-intro { grid-template-columns: 52px 1fr; gap: .75rem; align-items: start; }
  .order-success-intro .order-success-check { width: 48px; height: 48px; }
}

/* ===========================================================
   Full-page loader (also used for "Placing your order...")
   =========================================================== */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  opacity: 1;
  visibility: visible;
  transition: opacity .45s ease, visibility 0s linear 0s;
}
.site-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, visibility 0s linear .18s; }
.site-loader__box { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding: 1.5rem; animation: site-loader-pop .5s ease both; }
@keyframes site-loader-pop { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }
.site-loader__ring {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(from 0deg, #000 0deg, #777 110deg, transparent 200deg, transparent 360deg);
  animation: site-loader-spin 1.1s linear infinite;
}
.site-loader__ring::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #fff; }
.site-loader__logo, .site-loader__mark { position: relative; z-index: 1; width: 48px; height: 48px; object-fit: contain; border-radius: 50%; }
.site-loader__mark { display: flex; align-items: center; justify-content: center; font-weight: 500; font-size: 1.4rem; color: #000; }
@keyframes site-loader-spin { to { transform: rotate(360deg); } }
.site-loader__bag { display: none; width: 84px; height: 84px; }
.site-loader__bag svg { width: 100%; height: 100%; }
.site-loader__bag-body, .site-loader__bag-handle, .site-loader__bag-check { fill: none; stroke: #000; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.site-loader__bag-body { fill: #f6f6f6; }
.site-loader--order .site-loader__ring { display: none; }
.site-loader--order .site-loader__bag { display: block; animation: site-loader-bag-bounce 1.4s ease-in-out .9s infinite; }
.site-loader--order .site-loader__bag-body, .site-loader--order .site-loader__bag-handle { stroke-dasharray: 140; stroke-dashoffset: 140; animation: site-loader-draw .6s ease-out forwards; }
.site-loader--order .site-loader__bag-handle { animation-delay: .1s; }
.site-loader--order .site-loader__bag-check { stroke-dasharray: 30; stroke-dashoffset: 30; animation: site-loader-draw .5s ease-out .55s forwards; }
@keyframes site-loader-draw { to { stroke-dashoffset: 0; } }
@keyframes site-loader-bag-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.site-loader__text { margin: 0; font-size: .82rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.site-loader__dots span { display: inline-block; animation: site-loader-dots 1.2s ease-in-out infinite; opacity: 0; }
.site-loader__dots span:nth-child(2) { animation-delay: .15s; }
.site-loader__dots span:nth-child(3) { animation-delay: .3s; }
@keyframes site-loader-dots { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@media (max-width: 480px) {
  .site-loader__ring, .site-loader__bag { width: 64px; height: 64px; }
  .site-loader__logo, .site-loader__mark { width: 38px; height: 38px; }
}

/* ===========================================================
   Motion preferences + print
   =========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .site-loader__bag-body, .site-loader__bag-handle, .site-loader__bag-check,
  .order-success-check__circle, .order-success-check__mark { stroke-dashoffset: 0 !important; }
}
@media print {
  .no-print, .site-loader { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .invoice-card { box-shadow: none !important; border: 1px solid #ddd; max-width: 100%; }
  .invoice-totals > div, .invoice-table thead th { color: #333 !important; }
  a { text-decoration: none; color: inherit; }
}

/* ===========================================================
   Add-to-cart confirmation popup (slides down from the TOP,
   full width - matches the reference "Item added to cart" panel)
   Markup: frontend/includes/header.php · Behaviour: assets/js/main.js
   =========================================================== */
.cart-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .25);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
  z-index: 1090;
}
.cart-popup-overlay.show {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease, visibility 0s;
}
html.cart-popup-open { overflow: hidden; }

.cart-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--paper);
  z-index: 1091;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
}
.cart-popup.show { transform: translateY(0); }

.cart-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  letter-spacing: .02em;
}
.cart-popup-close {
  background: none;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  padding: 0 .25rem;
}

.cart-popup-body {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--line);
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}
.cart-popup-thumb {
  flex: 0 0 90px;
  width: 90px;
  height: 112px;
  background: var(--paper-alt);
  overflow: hidden;
}
.cart-popup-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-popup-info { flex: 1; min-width: 0; }
.cart-popup-name {
  font-weight: 500;
  margin-bottom: .35rem;
  line-height: 1.35;
}
.cart-popup-meta {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: .5rem;
}
.cart-popup-price { font-weight: 600; }

.cart-popup-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.25rem;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}
.cart-popup-actions .btn { border-radius: 0; width: 100%; }

.cart-popup-continue {
  background: none;
  border: 0;
  text-align: center;
  padding: 0 1.25rem 1.5rem;
  text-decoration: underline;
  color: var(--ink-soft);
  font-size: .92rem;
  cursor: pointer;
}
.cart-popup-continue:hover { color: var(--ink); }

@media (min-width: 576px) {
  .cart-popup-body { flex-direction: row; }
  .cart-popup-actions { flex-direction: row; }
}

/* Cart popup opens in the middle of the screen on every device
   (desktop, tablet and phone). */
.cart-popup {
  top: 50%;
  left: 50%;
  right: auto;
  width: min(480px, 92vw);
  max-height: 90vh;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(.92) !important;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, visibility 0s linear .35s !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.cart-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1) !important;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, visibility 0s !important;
}

/* Phones: "New Arrivals" button goes under the heading text. */
@media (max-width: 575.98px) {
  .new-arrivals-head { flex-direction: column; align-items: flex-start !important; }
}

/* ===========================================================
   Category slider - "Shop by Category" heading on the left and
   small square photo cards beside it. The row is a touch slider
   (swipe it with a finger, or drag with the mouse / trackpad) AND
   has two small arrow buttons next to the heading - on every screen
   size, including mobile - so it's obvious at a glance that there's
   more to see, not just a hidden gesture. Nothing wraps to a second line.
   =========================================================== */
.category-section-inner {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 2.5rem);
}
.category-heading-col {
  flex: 0 0 auto;
  max-width: 220px;
}
.category-heading-col .section-subtitle {
  text-align: left;
  margin-bottom: 0;
}
.category-heading-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}
.category-heading-top .section-title { margin-bottom: 0; text-align: left; }
.category-nav { display: flex; gap: 8px; flex: 0 0 auto; }
.slider-arrow-btn--sm { width: 32px; height: 32px; font-size: .8rem; }
@media (max-width: 767.98px) {
  .category-heading-top { margin-bottom: .2rem; }
  .slider-arrow-btn--sm { width: 30px; height: 30px; font-size: .76rem; }
}

.category-row {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 22px;
  scroll-snap-type: x proximity;
  scroll-padding-left: 4px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;            /* Firefox */
  -ms-overflow-style: none;         /* old Edge */
  cursor: grab;
  outline: none;
}
.category-row::-webkit-scrollbar { display: none; }
.category-row::after { content: ""; flex: 0 0 4px; }   /* breathing room after the last card */
.category-row.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.category-row.is-dragging .category-tile { pointer-events: none; }
/* soft fade on the right edge while there are more cards to swipe to */
.category-row.has-more {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent 100%);
}

.category-tile {
  position: relative;
  flex: 0 0 auto;
  display: block;
  width: 196px;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: var(--paper-alt);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .10), 0 1px 3px rgba(0, 0, 0, .08);
  scroll-snap-align: start;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.category-tile:hover, .category-tile:focus-visible {
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .10);
}
.category-tile:active { transform: scale(.97); }
.category-tile-media { position: absolute; inset: 0; display: block; }
.category-tile-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 30%;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
  -webkit-user-drag: none;
  pointer-events: none;
}
.category-tile:hover .category-tile-media img { transform: scale(1.09); }
/* dark gradient at the bottom (keeps the name readable) + fine inner border */
.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, .74) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.category-tile-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0 15px 15px;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .1em;
  line-height: 1.3;
  text-transform: uppercase;
  text-align: left;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.category-tile-go {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .78rem;
  color: #111;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity .3s ease, transform .3s ease;
}
.category-tile:hover .category-tile-go, .category-tile:focus-visible .category-tile-go { opacity: 1; transform: none; }
@media (hover: none) { .category-tile-go { opacity: .92; transform: none; } }   /* touch phones: always show the little arrow */

@media (max-width: 767.98px) {
  .category-section-inner { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .category-heading-col { max-width: 100%; }
  /* let the cards run right up to the screen edges so it's obvious the row can be swiped */
  .category-row {
    width: calc(100% + 1.5rem);
    margin: 0 -.75rem;
    padding-left: .75rem;
    padding-right: .75rem;
    scroll-padding-left: .75rem;
    gap: 12px;
  }
  .category-row.has-more { -webkit-mask-image: none; mask-image: none; }
  .category-tile { width: 160px; border-radius: 18px; }
  .category-tile-name { font-size: .74rem; padding: 0 12px 12px; }
}
@media (max-width: 380px) {
  .category-tile { width: 144px; }
}



/* ===========================================================
   Checkout - distraction-free page (no header / footer)
   =========================================================== */
.checkout-back-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-bottom: .9rem;
  color: var(--ink-soft);
  font-size: .85rem;
  text-decoration: none;
}
.checkout-back-link:hover { color: var(--ink); }

.checkout-brand-logo {
  max-height: 56px;
  width: auto;
}
.checkout-brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: .04em;
  color: var(--ink);
}

/* ===========================================================
   Mobile slide-in menu (hamburger)
   =========================================================== */
@media (max-width: 991.98px) {
  #mainNav { display: none !important; } /* replaced by #mobileDrawer */
}
.mobile-drawer {
  --bs-offcanvas-width: min(84vw, 340px);
  --bs-offcanvas-transition: transform .5s cubic-bezier(.22, 1, .36, 1);
  border-right: 0; background: #fff; box-shadow: 12px 0 40px rgba(0,0,0,.18);
}
.offcanvas-backdrop { transition: opacity .35s ease; }
.offcanvas-backdrop.show { opacity: .55; backdrop-filter: blur(2px); }
.mobile-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.25rem; border-bottom: 1px solid var(--line); }
.mobile-drawer-brand { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.mobile-drawer-brand img { height: 52px; width: auto; max-width: 190px; object-fit: contain; }
.mobile-drawer-close {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink);
  transition: transform .35s ease, background .2s ease, color .2s ease;
}
.mobile-drawer-close:hover { background: #000; color: #fff; transform: rotate(90deg); }
.mobile-drawer-body { flex: 1; overflow-y: auto; padding: .5rem 1.25rem; }
.drawer-link {
  width: 100%; display: flex; align-items: center; gap: .9rem; padding: 1rem .25rem;
  background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left;
  color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; position: relative;
  transition: padding-left .25s ease, color .2s ease;
}
.drawer-link > i:first-child { font-size: 1.15rem; width: 1.4rem; text-align: center; }
.drawer-link span { flex: 1; }
.drawer-link:hover, .drawer-link.active { padding-left: .6rem; color: #000; }
.drawer-link.active::before { content: ""; position: absolute; left: -1.25rem; top: 20%; bottom: 20%; width: 3px; background: #000; border-radius: 0 3px 3px 0; }
.drawer-chevron { font-size: .8rem; transition: transform .3s ease; }
.drawer-toggle[aria-expanded="true"] .drawer-chevron { transform: rotate(180deg); }
.drawer-sub { margin: 0; padding: .35rem 0 .6rem 2.3rem; }
.drawer-sub a { display: flex; align-items: center; gap: .75rem; padding: .55rem 0; color: var(--ink-soft); text-decoration: none; font-size: .9rem; }
.drawer-sub a.active, .drawer-sub a:hover { color: #000; font-weight: 500; }
.drawer-sub img { width: 34px; height: 34px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.mobile-drawer-footer { padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.mobile-drawer-footer .btn { height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 0; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; }

/* staggered entrance every time the menu opens */
.mobile-drawer .drawer-link, .mobile-drawer .drawer-group, .mobile-drawer-footer { opacity: 0; transform: translateX(-22px); }
.mobile-drawer.show .drawer-link, .mobile-drawer.show .drawer-group, .mobile-drawer.show .mobile-drawer-footer {
  animation: drawerItemIn .55s cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 60ms + 180ms);
}
.mobile-drawer.show .drawer-group .drawer-link { animation: none; opacity: 1; transform: none; }
@keyframes drawerItemIn { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: translateX(0); } }

/* ===========================================================
   Motion: hero, scroll-reveal, hover micro-interactions
   =========================================================== */
/* Hero: slow zoom on the active picture + caption rising in */
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.07); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
.hero-slider .carousel-item.active .hero-slide-img,
.hero-slider .carousel-item-next .hero-slide-img,
.hero-slider .carousel-item-prev .hero-slide-img { animation: none; }   /* no zoom: it would crop the edges of the picture */
.hero-slider .carousel-item.active .hero-slide-content > * { opacity: 0; animation: riseIn .8s cubic-bezier(.22, 1, .36, 1) forwards; }
.hero-slider .carousel-item.active .hero-slide-content > *:nth-child(1) { animation-delay: .15s; }
.hero-slider .carousel-item.active .hero-slide-content > *:nth-child(2) { animation-delay: .3s; }
.hero-slider .carousel-item.active .hero-slide-content > *:nth-child(3) { animation-delay: .45s; }
.hero-slider .carousel-item { transition: transform .7s cubic-bezier(.65, 0, .35, 1); }

/* Scroll reveal (classes are added by main.js only when motion is allowed) */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1); will-change: opacity, transform; }
.reveal.reveal-left { transform: translateX(-34px); }
.reveal.reveal-zoom { transform: scale(.94); }
.reveal.reveal-in { opacity: 1; transform: none; }

/* Hover micro-interactions */
.btn { transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease; }
.btn-primary:hover, .btn-dark:hover, .btn-outline-primary:hover, .btn-outline-dark:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, .16); }
.btn:active { transform: translateY(0); box-shadow: none; }
.feature-box { transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease; }
.feature-box:hover { transform: translateY(-6px); }
.feature-box .icon-circle { transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.feature-box:hover .icon-circle { transform: scale(1.12) rotate(-6deg); }
.product-card .product-thumb, .product-card-compact .product-compact-thumb { overflow: hidden; }
.product-card .quick-add-btn { transition: opacity .3s ease, transform .3s cubic-bezier(.22, 1, .36, 1), background .2s ease; }
.promo-banner { position: relative; overflow: hidden; }
.promo-banner::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .14), transparent);
  transform: skewX(-20deg); animation: promoShine 5.5s ease-in-out infinite; pointer-events: none;
}
@keyframes promoShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-slider .carousel-item .hero-slide-img, .hero-slider .carousel-item .hero-slide-content > *,
  .promo-banner::after, .mobile-drawer .drawer-link,
  .mobile-drawer .drawer-group, .mobile-drawer-footer { animation: none !important; opacity: 1 !important; transform: none !important; }
}


/* ===========================================================
   Policy pages (Admin > Policies)
   =========================================================== */
.policy-content { font-size: 1rem; line-height: 1.8; color: #333; }
.policy-content h3 { font-size: 1.15rem; font-weight: 600; margin: 1.8rem 0 .6rem; letter-spacing: .02em; }
.policy-content p { margin-bottom: 1rem; }
.policy-content ul { padding-left: 1.2rem; margin-bottom: 1rem; }
.policy-content li { margin-bottom: .35rem; }


/* ===========================================================
   Button loading state - spinner shown ON the clicked button
   =========================================================== */
.btn-is-loading {
  position: relative;
  pointer-events: none;
  cursor: progress;
  color: transparent !important;
}
.btn-is-loading > *,
.btn-is-loading i { color: transparent !important; }
.btn-is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.15em;
  height: 1.15em;
  border-radius: 50%;
  border: 2px solid var(--btn-spin-color, #fff);
  border-right-color: transparent;
  animation: btnSpin .7s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn-is-loading::after { animation-duration: 1.6s; } }

/* Phones: no zoom-in animation on slider pictures (it would crop the edges of the now fully-visible picture) */
@media (max-width: 767.98px) {
  .hero-slider .carousel-item.active .hero-slide-img,
  .hero-slider .carousel-item-next .hero-slide-img,
  .hero-slider .carousel-item-prev .hero-slide-img { animation: none; }
}

/* ===========================================================
   Footer spacing fix (phones/tablets) - Bootstrap's gy-4 gutter was adding
   a big empty gap above every accordion row. Rows now sit tight with one
   divider line between them.
   =========================================================== */
@media (max-width: 991.98px) {
  .site-footer { margin-top: 1.5rem !important; padding-top: .5rem !important; }
  .site-footer .row { --bs-gutter-y: 0; }
  .site-footer .footer-column { padding-top: .8rem; padding-bottom: .8rem; margin-top: 0; }
  .site-footer .footer-column .footer-accordion-toggle { min-height: 28px; }
  .site-footer .footer-accordion-content { padding: .6rem 0 .1rem; margin-bottom: 0; }
  .site-footer .footer-accordion-content li:last-child { margin-bottom: 0 !important; }
  .site-footer .col-12.col-lg-4 { padding-top: 1.1rem; }
  .site-footer hr { margin: 1.25rem 0 !important; }
}


/* ===========================================================
   Product page on phones: order = product, You May Also Like,
   then Customer Reviews (centered, below "View All Products")
   =========================================================== */
@media (max-width: 767.98px) {
  .product-detail-page { display: flex; flex-direction: column; }
  .product-detail-page > .related-products-section { order: 2; width: 100%; }
  .product-detail-page > .product-reviews-block {
    order: 3;
    width: 100%;
    text-align: center;
    margin-top: 2.5rem !important;
    padding-top: 2rem !important;
    border-top: 1px solid var(--line);
  }
  .product-reviews-block .section-title { text-align: center !important; }
  .product-reviews-block .d-flex.justify-content-between { flex-direction: column; align-items: center !important; gap: .15rem; }
  .product-reviews-block .card { margin-left: auto; margin-right: auto; text-align: left; }
}

/* never let any picture or block push the page sideways */
main, .site-footer { overflow-x: clip; }
img, video { max-width: 100%; }


/* ===========================================================
   Product page refresh: modern actions, description, dropdowns
   =========================================================== */
.pd-actions { display: flex; align-items: stretch; gap: .75rem; flex-wrap: wrap; }
.pd-actions .qty-selector { width: auto; flex: 0 0 auto; }
.pd-actions .qty-selector .btn { border-radius: 0; min-width: 44px; font-size: 1.1rem; line-height: 1; }
.pd-actions .qty-selector input { max-width: 64px; border-radius: 0; box-shadow: none; }
.pd-actions .add-to-cart-btn {
  border-radius: 0; letter-spacing: .12em; text-transform: uppercase;
  font-size: .85rem; font-weight: 500; padding: .85rem 1.5rem; min-width: 180px;
}
@media (max-width: 575.98px) {
  .pd-actions .add-to-cart-btn { flex: 1 1 100%; }
}

.pd-description { margin-bottom: 1.5rem; }
.pd-heading { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin-bottom: .6rem; color: var(--ink); }
.pd-text { color: #5f5f5f; line-height: 1.75; margin-bottom: 0; }

.pd-accordion { --bs-accordion-border-radius: 0; --bs-accordion-inner-border-radius: 0; border-top: 1px solid var(--line); }
.pd-accordion .accordion-item { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.pd-accordion .accordion-button {
  background: transparent; box-shadow: none; padding: 1rem 0; border-radius: 0;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--ink);
}
.pd-accordion .accordion-button:not(.collapsed) { background: transparent; color: var(--ink); box-shadow: none; }
.pd-accordion .accordion-button:focus { box-shadow: none; }
.pd-accordion .accordion-body { padding: 0 0 1.1rem; color: #5f5f5f; line-height: 1.7; font-size: .92rem; }

/* "You May Also Like": slightly shorter photos */
.related-products-section .product-compact-media { aspect-ratio: 5 / 6; }
