/* ============================================================
   MIRA HOME — Shop Page Styles (Fixed - No Slide Sidebar)
   ============================================================ */

/* ── SHOP LAYOUT ROOT ── */
* { box-sizing: border-box; }

/* FIX (direct user ask: "the container where branches filter was placed
   needs to be sticky upon scrolling down") — .shop-sidebar already has
   `position: sticky` (below) and .shop-grid already has `align-items:
   start` (both correct prerequisites), but ANY ancestor with an
   `overflow` other than `visible` breaks position:sticky for its
   descendants, and .shop-layout is the sidebar's own ancestor here.
   `overflow-x: clip` was left over from this file's older "slide
   sidebar" design (see the file header comment) — the site already
   guards against horizontal page bleed globally via
   `body { overflow-x: hidden; }` in main.css, so this was redundant on
   top of silently defeating the sidebar's sticky behavior. Removed. */

.shop-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  width: 100%;
}

/* Breadcrumb row: crumb left, AR toggle right */
.shop-breadcrumb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.breadcrumb-ar-toggle {
  margin: 0;
}

/* The AR switch and the "?" that explains Compare, kept together on the right of the strip (they wrap together on a narrow screen) */
.shop-breadcrumb-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Mobile tab bar */
.shop-mobile-tabs {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.shop-mobile-tabs-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
}
.shop-mobile-tab {
  flex: 1;
  text-align: center;
  background: none;
  border: none;
  padding: var(--space-2) 0;
  font-weight: var(--fw-medium);
  color: var(--color-brown-mid);
  border-bottom: 2px solid transparent;
}

.shop-mobile-tab.active {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary-dark);
}

/* Mobile panels: hidden unless active, and only relevant on mobile */
.shop-mobile-panel { display: none; }
.shop-mobile-panel.active { display: block; }

@media (min-width: 992px) {
  .shop-mobile-tabs,
  #mobilePanelShop,
  #mobilePanelCategories { display: none !important; }
  #mobilePanelProducts { display: block !important; } /* always shown on desktop */
}

@media (max-width: 991px) {
  .shop-sidebar { display: none !important; } /* hidden by default on Shop/Categories tabs */
  #mobilePanelProducts.shop-mobile-panel { display: none; }
  #mobilePanelProducts.shop-mobile-panel.active { display: block; }

  /* Products tab: bring back Search only (not Categories) */
  body[data-mobile-tab="products"] .shop-sidebar {
    display: flex !important;
    position: static;
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow-y: visible;
    margin-top: var(--space-4);
  }

  .shop-sidebar .sidebar-block--categories {
    display: none !important; /* Categories already lives in its own tab */
  }
}

/* Tighten vertical spacing under the breadcrumb / tab bar */
.shop-layout.section-py {
  padding-top: var(--space-4);
}

.mobile-jfy-heading {
  font-weight: var(--fw-semibold);
  margin: var(--space-5) 0 var(--space-3);
}

@media (max-width: 991px) {
  .shop-layout.section-py {
    padding-top: var(--space-3);
  }

  .shop-mobile-tabs-row {
    padding-bottom: 0;
  }

  #mobilePanelShop .container,
  #mobilePanelCategories .container {
    padding-top: var(--space-3);
  }
}

.mobile-cat-list-link--all {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  font-weight: var(--fw-semibold);
  color: var(--color-primary-dark);
  cursor: pointer;
}

/* Horizontal category rows on the "Shop" mobile tab */
.mobile-cat-row { margin-bottom: var(--space-5); }

.mobile-cat-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.mobile-cat-row-header h6 { margin: 0; font-weight: var(--fw-semibold); }

.mobile-cat-rows .mobile-cat-scroll.products-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
  gap: var(--space-3);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-2); /* room for scrollbar without clipping cards */
}

.mobile-cat-rows .mobile-cat-scroll.products-grid .product-card {
  /* Widened from 150px — the card's footer needs room for price +
     wishlist + add-to-cart + a Buy Now button with visible text without
     the button getting clipped by .product-card's overflow:hidden.
     Safe to widen since this is a horizontally-scrolling strip, not a
     fixed grid column. */
  flex: 0 0 172px;
  width: 172px;
  scroll-snap-align: start;
}

@media (max-width: 375px) {
  .mobile-cat-rows .mobile-cat-scroll.products-grid .product-card {
    flex: 0 0 158px;
    width: 158px;
  }
}

/* Footer (price + buttons) is too tight at 150-170px — compact it down
   the same way home's featured grid does at narrow widths: Add-to-cart
   goes icon-only, but Buy Now keeps its label (shrunk) just like home's
   .featured-grid does at every breakpoint, so the two pages stay consistent. */
.mobile-cat-rows .mobile-cat-scroll.products-grid .product-card-body {
  padding: var(--space-2);
}

.mobile-cat-rows .mobile-cat-scroll.products-grid .product-card-footer {
  gap: 3px;
}

.mobile-cat-rows .mobile-cat-scroll.products-grid .product-prices {
  min-width: 34px;
}

.mobile-cat-rows .mobile-cat-scroll.products-grid .price {
  font-size: 0.68rem;
}

.mobile-cat-rows .mobile-cat-scroll.products-grid .price-original {
  font-size: 0.5rem;
}

.mobile-cat-rows .mobile-cat-scroll.products-grid .product-card-footer-actions {
  gap: 2px;
}

.mobile-cat-rows .mobile-cat-scroll.products-grid .btn-wishlist-card {
  width: 24px;
  height: 24px;
  font-size: 0.6rem;
}

/* Add to cart — icon-only square, same as home's featured grid */
.mobile-cat-rows .mobile-cat-scroll.products-grid .btn-add-cart {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  justify-content: center;
  font-size: 0.65rem;
}

.mobile-cat-rows .mobile-cat-scroll.products-grid .btn-add-cart .btn-cart-label {
  display: none;
}

/* Buy Now — keeps its label visible, auto width, matching home. Kept
   compact (small icon, tight padding/gap) so the full "Buy Now" fits
   inside the card instead of getting cut off by .product-card's
   overflow:hidden. */
.mobile-cat-rows .mobile-cat-scroll.products-grid .btn-buy-now-card {
  width: auto;
  height: 24px;
  min-width: 20px;
  padding: 0 4px;
  justify-content: center;
  font-size: 0.46rem;
  gap: 1px;
}

.mobile-cat-rows .mobile-cat-scroll.products-grid .btn-buy-now-card .btn-cart-label {
  display: inline;
  white-space: nowrap;
}

.mobile-cat-rows .mobile-cat-scroll.products-grid .btn-add-cart i {
  font-size: 0.65rem;
}

.mobile-cat-rows .mobile-cat-scroll.products-grid .btn-buy-now-card i {
  font-size: 0.58rem;
}

/* Flat mobile category list (Categories tab — every width ≤991px,
   i.e. tablets and phones).

   Alignment model: every row ends in the same fixed-width slot
   (--mcat-slot) — the ▾ .mobile-cat-toggle button on categories that
   have subcategories, a › .mobile-cat-go icon on every other row (leaf
   categories, subcategories, All Products). The name span takes the
   remaining width (wrapping if long, since touch has no hover tooltip)
   and the count sits flush against the slot, so counts form one
   straight column and chevrons form another on every row type.
   The links use gap:0 + a margin on the count (not flex `gap`) on
   purpose: a leaf row's › lives INSIDE its link while a parent's ▾ sits
   OUTSIDE it, so a link-level gap would offset one kind of row by 8px. */
.mobile-cat-list {
  --mcat-slot: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-cat-list-link {
  display: flex;
  align-items: center;
  gap: 0;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--color-charcoal);
  text-decoration: none;
}

.mobile-cat-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mobile-cat-list .sidebar-cat-count {
  margin: 0 0 0 var(--space-2);
  color: var(--color-brown-mid);
}

.mobile-cat-go {
  width: var(--mcat-slot);
  flex-shrink: 0;
  text-align: center;
  color: var(--color-stone);
  font-size: 0.8rem;
}

.mobile-cat-list-link.active {
  color: var(--color-primary-dark);
  font-weight: var(--fw-semibold);
}

/* ------------------------------------------------------------
   MOBILE CATEGORIES PANEL — expand/collapse sub-categories
   FIX (direct user ask: "in desktop it also displays the
   subcategories but in mobile it dont display, it has no
   dropdown"): mirrors the desktop sidebar's
   .sidebar-cat-parent-item/.sidebar-cat-toggle/.sidebar-subcat-list
   rules just above, under mobile-prefixed class names so this
   panel's markup stays independent of the desktop sidebar's.
   ------------------------------------------------------------ */
.mobile-cat-parent-item {
  border-bottom: 1px solid var(--border-light);
}

.mobile-cat-parent-item .mobile-cat-list-link {
  border-bottom: none;
}

/* gap:0 — the ▾ toggle must start exactly where a leaf row's › slot
   starts, or this row's count would sit left of the others. */
.mobile-cat-parent-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.mobile-cat-parent-row .mobile-cat-list-link {
  flex: 1;
  min-width: 0;
}

.mobile-cat-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--mcat-slot);
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-stone);
  font-size: 0.85rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.mobile-cat-toggle:hover {
  background-color: var(--bg-section-alt);
}

/* The <i> is a flex item of the inline-flex button (so it's blockified
   and can actually be transformed — it used to be a plain inline <i>,
   where rotate() silently did nothing). */
.mobile-cat-toggle i {
  transition: transform 0.2s ease;
}

.mobile-cat-toggle.open i {
  transform: rotate(180deg);
}

/* Indent on the LEFT only (≈22px); the right edge stays flush with the
   parent rows, so subcategory counts/› line up with theirs. */
.mobile-subcat-list {
  list-style: none;
  margin: 0 0 0 var(--space-2);
  padding: 0 0 var(--space-2) var(--space-3);
  border-left: 2px solid var(--border-light);
}

.mobile-subcat-link {
  display: flex;
  align-items: center;
  gap: 0;
  padding: var(--space-2) 0;
  font-size: 0.85rem;
  color: var(--color-stone);
  text-decoration: none;
}

.mobile-subcat-link.active {
  color: var(--color-primary-dark);
  font-weight: var(--fw-semibold);
}

/* ── SIDEBAR - Always visible, full length, improved layout ── */
.shop-sidebar {
  position: sticky;
  top: var(--navbar-height);
  max-height: calc(100vh - var(--navbar-height) - 20px);
  overflow-y: auto;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.sidebar-mobile-header {
  display: none;
}

.sidebar-close-btn {
  display: none;
}


/* Sidebar blocks */
.sidebar-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-block-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin: 0;
}

/* ── SIDEBAR CATEGORIES (desktop ≥992px; also the flat Branch list) ──
   Alignment model (fix for "counts not straight vertically"): every
   category row is a .sidebar-cat-parent-row grid that ALWAYS reserves
   the chevron column (--cat-slot), whether or not the row has a ▾
   toggle — a leaf row's link just leaves column 2 empty. Subcategory
   lists reserve the same column on their right edge, and every link
   uses the same 12px right padding, so every count pill ends at the
   same x. The Branch list doesn't use .sidebar-cat-parent-row (no
   toggles), so its counts stay flush right within its own block.
   (This used to be defined twice in this file; the later copy won —
   its values are the ones kept here and the duplicate was removed.) */
.sidebar-block--categories {
  --cat-slot: 28px;
  --cat-gap: 4px;
}

.sidebar-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-cat-parent-item {
  margin-bottom: 0;
}

.sidebar-cat-parent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--cat-slot, 0px);
  column-gap: var(--cat-gap, 0px);
  align-items: center;
}

.sidebar-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--color-brown-mid);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

.sidebar-cat-link span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-cat-link:hover {
  background-color: var(--color-primary-xlight);
  color: var(--color-charcoal);
}

.sidebar-cat-link.active {
  background-color: var(--color-charcoal);
  color: var(--color-cream);
}

/* One count pill for every row (parents, subcategories, branches):
   min-width + centered tabular digits make 1–3-digit counts identical-
   width pills, so both pill edges line up and the AR-toggle count swap
   (shop.js applyArCategoryCounts) never shifts the row. */
.sidebar-cat-count {
  font-size: 0.7rem;
  background-color: var(--bg-section-alt);
  color: var(--color-brown-light);
  min-width: 2rem;
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: center;
  flex-shrink: 0;
  margin-left: 8px;
}

.sidebar-cat-link.active .sidebar-cat-count {
  background-color: rgba(255,255,255,0.15);
  color: var(--color-cream);
}

/* The pill's bg (#F5EDE0) is the same color as the hover / active-
   subcategory row bg, so it vanished there — lift it onto the card bg. */
.sidebar-cat-link:hover:not(.active) .sidebar-cat-count,
.sidebar-subcat-link:hover .sidebar-cat-count,
.sidebar-subcat-link.active .sidebar-cat-count {
  background-color: var(--bg-card);
}

.sidebar-cat-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--cat-slot, 28px);
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-stone);
  font-size: 0.75rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.sidebar-cat-toggle:hover {
  background-color: var(--bg-section-alt);
}

/* The <i> is a flex item of the inline-flex button (so it's blockified
   and can actually be transformed — it used to be a plain inline <i>,
   where rotate() silently did nothing). */
.sidebar-cat-toggle i {
  transition: transform 0.2s ease;
}

.sidebar-cat-toggle.open i {
  transform: rotate(180deg);
}

/* Indented on the left; on the right it stops where the parent LINKS
   stop (i.e. before the reserved chevron column), so subcategory counts
   line up with the parent counts above them. */
.sidebar-subcat-list {
  list-style: none;
  margin: 4px calc(var(--cat-slot, 0px) + var(--cat-gap, 0px)) 0 14px;
  padding: 0 0 0 8px;
  border-left: 2px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-subcat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 6px 10px; /* right = .sidebar-cat-link's 12px */
  font-size: 0.8rem;
  color: var(--color-stone);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sidebar-subcat-link span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-subcat-link:hover {
  background-color: var(--bg-section-alt);
  color: var(--color-charcoal);
}

.sidebar-subcat-link.active {
  background-color: var(--color-primary-xlight);
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* Sort list */
.sidebar-sort-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-sort-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--color-brown-mid);
  text-decoration: none;
  transition: all 0.2s ease;
}

.sidebar-sort-link:hover {
  background-color: var(--color-primary-xlight);
  color: var(--color-charcoal);
}

.sidebar-sort-link.active {
  background-color: var(--color-primary-xlight);
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* Search */
.sidebar-search-wrap {
  position: relative;
}

.sidebar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-brown-light);
  font-size: 0.85rem;
}

.sidebar-search-input {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.2rem;
  font-size: 0.85rem;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}

.sidebar-search-input:focus {
  border-color: var(--color-primary);
}

/* AR toggle */
.sidebar-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.sidebar-toggle-check {
  display: none;
}

.sidebar-toggle-box {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background-color: var(--border-color);
  position: relative;
  transition: background-color 0.2s;
}

.sidebar-toggle-box::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: white;
  transition: transform 0.2s;
}

.sidebar-toggle-check:checked + .sidebar-toggle-box {
  background-color: var(--color-primary-dark);
}

.sidebar-toggle-check:checked + .sidebar-toggle-box::after {
  transform: translateX(16px);
}

.sidebar-toggle-text {
  font-size: 0.85rem;
  color: var(--color-brown-mid);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Clear filters */
.btn-clear-filters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-danger);
  border: 1.5px solid rgba(184,92,74,0.25);
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.2s;
  background: rgba(184,92,74,0.04);
  margin-top: 0.5rem;
}

.btn-clear-filters:hover {
  background: rgba(184,92,74,0.1);
  border-color: rgba(184,92,74,0.4);
}

/* ── SHOP MAIN ── */
.shop-main {
  min-width: 0;
  overflow: visible;
}

/* Toolbar */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
}

.shop-toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-filter-toggle {
  display: none;
}

.shop-result-count {
  font-size: 0.85rem;
  color: var(--color-brown-mid);
  margin: 0;
}

.shop-result-count strong {
  color: var(--color-charcoal);
}

/* View toggle */
.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-section-alt);
  border-radius: 8px;
  padding: 3px;
}

.view-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--color-brown-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn.active {
  background: white;
  color: var(--color-charcoal);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Sort select */
.shop-sort-select {
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font-size: 0.85rem;
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23A8845E' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* Active filter pills */
.active-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--color-primary-xlight);
  border: 1px solid var(--color-primary-light);
  border-radius: 30px;
  font-size: 0.75rem;
  color: var(--color-primary-dark);
}

.filter-pill-remove {
  color: var(--color-primary-dark);
  text-decoration: none;
  opacity: 0.7;
}

.filter-pill-remove:hover {
  opacity: 1;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Product Card */
.product-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.product-card-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ffffff;
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-img {
  transform: scale(1.05);
}

.product-card-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.product-card:hover .product-card-actions {
  opacity: 1;
  transform: translateY(0);
}

.product-action-btn {
  padding: 0.35rem 0.75rem;
  background: white;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-charcoal);
  transition: all 0.2s;
}

.product-action-btn:hover {
  background: var(--color-charcoal);
  color: white;
}

.product-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}
.product-card-category {
  font-size: 0.6rem;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.product-badge {
  font-size: 0.6rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
}

.product-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* A very long word with no spaces wraps (and is clamped to 2 lines) instead of being cut off at the card edge. */
  overflow-wrap: anywhere;
}

.product-card-name a {
  color: var(--color-charcoal);
  text-decoration: none;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.stars {
  display: flex;
  gap: 1px;
}

.stars i {
  font-size: 0.65rem;
  color: var(--color-primary);
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: nowrap;
}

.product-prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-original {
  font-size: 0.7rem;
  color: var(--color-stone);
  text-decoration: line-through;
  font-weight: 400;
}

/* Sold count - moved to right with margin-left auto */
/* Sold count - positioned in rating row with proper spacing */
.sold-count {
  font-size: 0.65rem;
  color: var(--color-brown-light);
  white-space: nowrap;
  margin-left: auto;
  padding-left: 0.5rem;
  flex-shrink: 0;
}

.product-card-footer-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
}

.btn-wishlist-card {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--color-brown-light);
  font-size: 0.88rem;
  flex-shrink: 0;
}

.btn-wishlist-card:hover {
  background: #fff0ee;
  border-color: rgba(184,92,74,0.3);
  color: var(--color-danger);
}

.btn-add-cart {
  padding: 0.4rem 0.9rem;
  background: var(--color-charcoal);
  color: white;
  border: 1.5px solid var(--color-charcoal);
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  height: 34px;
}

.btn-add-cart .btn-cart-label {
  display: inline;
}

.btn-add-cart:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-buy-now-card {
  padding: 0.4rem 0.9rem;
  background: var(--color-charcoal);
  color: white;
  border: 1.5px solid var(--color-charcoal);
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  height: 34px;
}

.btn-buy-now-card .btn-cart-label {
  display: inline;
}

.btn-buy-now-card:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------
   SOLD OUT — overlay badge on a card's image
   FIX (direct user ask: "make the sold out text or circle
   smaller, not too big and not too small"): shop.ejs already
   rendered .product-sold-out-overlay/-circle/-text but shop.css
   had no rules for them at all, so the circle had no fixed size —
   these give it a deliberate, modest size instead of one growing
   to fit its own uppercase text at full font size.
   ------------------------------------------------------------ */
.product-sold-out-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 16, 12, 0.28);
  pointer-events: none;
}

.product-sold-out-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(20, 16, 12, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.product-sold-out-text {
  color: #fff;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

@media (max-width: 576px) {
  .product-sold-out-circle {
    width: 48px;
    height: 48px;
  }

  .product-sold-out-text {
    font-size: 0.56rem;
  }
}

/* ------------------------------------------------------------
   SOLD OUT SECTION — sold-out products, grouped below the
   in-stock grid, with their own small pager
   FIX (direct user ask: "put all sold out products in the
   bottom of products that is not sold out... put text Sold out
   then pagination then display all sold out products"):
   ------------------------------------------------------------ */
.sold-out-section {
  margin-top: var(--space-8, 2.5rem);
  padding-top: var(--space-6, 1.5rem);
  border-top: 1px solid var(--border-light);
}

.sold-out-divider-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-charcoal);
  margin-bottom: var(--space-4, 1rem);
}

.sold-out-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: var(--space-5, 1.5rem);
}

.sold-out-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 0.4rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: #fff;
  color: var(--color-charcoal);
  font-size: 0.82rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sold-out-page-btn:hover:not(:disabled):not(.active) {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.sold-out-page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  cursor: default;
}

.sold-out-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sold-out-page-ellipsis {
  padding: 0 0.15rem;
  color: var(--color-stone);
  font-size: 0.82rem;
}

/* Sold-out cards read as unavailable at a glance, even before the
   overlay/toolbar are noticed */
.sold-out-section .product-card {
  opacity: 0.92;
}

/* Empty state */
.shop-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.shop-empty-icon {
  font-size: 3rem;
  color: var(--color-stone);
  margin-bottom: 1rem;
}


.shop-banner {
  position: relative;
  height: 320px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.shop-banner-bg {
  position: absolute;
  inset: 0;
}

.shop-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.02);
}

.shop-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(250,246,240,0.92) 0%,
    rgba(250,246,240,0.70) 45%,
    rgba(250,246,240,0.25) 100%
  );
}

.shop-banner-content {
  position: relative;
  z-index: 1;
}

.shop-banner-label {
  margin-bottom: var(--space-2);
}

.shop-banner-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--color-charcoal);
  line-height: 1.1;
  margin: 0 0 var(--space-3);
}

.shop-banner-title em {
  font-style: italic;
  color: var(--color-primary-dark);
  font-weight: 400;
}

.shop-banner-sub {
  font-size: var(--fs-sm);
  color: var(--color-brown-mid);
  margin: 0;
}

.shop-banner-sub strong {
  color: var(--color-charcoal);
  font-weight: var(--fw-semibold);
}


/* ------------------------------------------------------------
   STICKY HEADER — breadcrumb + AR toggle + mobile tabs
   stick together as one unit under the navbar
   ------------------------------------------------------------ */
.shop-sticky-header {
  position: sticky;
  top: var(--navbar-height); /* tracks the real sticky navbar height, incl. mobile */
  z-index: 500;
}

/* ------------------------------------------------------------
   2. BREADCRUMB BAR
   ------------------------------------------------------------ */
.shop-breadcrumb-bar {
  background-color: var(--bg-section-alt);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-3) 0;
}

.shop-breadcrumb {
  font-size: var(--fs-xs);
  margin: 0;
}

.shop-breadcrumb .breadcrumb-item a {
  color: var(--color-brown-mid);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

.shop-breadcrumb .breadcrumb-item.active {
  color: var(--color-charcoal);
  font-weight: var(--fw-medium);
}

.shop-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: var(--color-stone);
}


/* Duplicate .shop-grid and .shop-sidebar removed - using first declarations instead */

/* Sidebar block */
.sidebar-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-light);
}

.sidebar-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-block-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-brown-dark);
  margin: 0;
}

/* Search */
.sidebar-search-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sidebar-search-wrap {
  position: relative;
}

.sidebar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-brown-light);
  font-size: 0.85rem;
  pointer-events: none;
}

.sidebar-search-input {
  width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 2.2rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--color-charcoal);
  background-color: var(--bg-page);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.sidebar-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(200,168,130,0.15);
}

/* Category list — defined once, under "SIDEBAR CATEGORIES" near the
   top of this file (a duplicate copy used to live here and silently
   override it). */

/* Sort list */
.sidebar-sort-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-sort-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--color-brown-mid);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-weight: var(--fw-medium);
}

.sidebar-sort-link:hover {
  background-color: var(--color-primary-xlight);
  color: var(--color-charcoal);
}

.sidebar-sort-link.active {
  background-color: var(--color-primary-xlight);
  color: var(--color-primary-dark);
  font-weight: var(--fw-semibold);
}

.sidebar-sort-link i {
  font-size: 0.9rem;
  width: 16px;
  text-align: center;
}

/* Price range */
.sidebar-price-range {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.price-range-track {
  height: 4px;
  background-color: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.price-range-fill {
  height: 100%;
  width: 75%;
  background: linear-gradient(to right, var(--color-primary), var(--color-primary-dark));
  border-radius: var(--radius-full);
}

.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--color-brown-light);
  font-weight: var(--fw-medium);
}

/* AR toggle */
.sidebar-toggle-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.sidebar-toggle-check {
  display: none;
}

.sidebar-toggle-box {
  width: 38px;
  height: 22px;
  border-radius: var(--radius-full);
  background-color: var(--border-color);
  position: relative;
  flex-shrink: 0;
  transition: background-color var(--transition-base);
}

.sidebar-toggle-box::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: white;
  transition: transform var(--transition-base);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.sidebar-toggle-check:checked + .sidebar-toggle-box {
  background-color: var(--color-primary-dark);
}

.sidebar-toggle-check:checked + .sidebar-toggle-box::after {
  transform: translateX(16px);
}

.sidebar-toggle-text {
  font-size: var(--fs-sm);
  color: var(--color-brown-mid);
  font-weight: var(--fw-medium);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sidebar-toggle-text i {
  color: var(--color-primary-dark);
}

/* Clear filters */
.btn-clear-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-danger);
  border: 1.5px solid rgba(184,92,74,0.25);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
  background-color: rgba(184,92,74,0.04);
}

.btn-clear-filters:hover {
  background-color: rgba(184,92,74,0.08);
  border-color: rgba(184,92,74,0.4);
  color: var(--color-danger);
}


/* ------------------------------------------------------------
   5. SHOP MAIN — Toolbar
   ------------------------------------------------------------ */
.shop-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-4);
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.shop-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.shop-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Filter toggle (mobile only) */
@media (max-width: 991px) {
  .btn-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-charcoal);
    background-color: var(--bg-page);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-base);
  }

  .btn-filter-toggle:hover {
    border-color: var(--color-primary);
    background-color: var(--color-primary-xlight);
  }
}

.filter-active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-primary-dark);
  position: absolute;
  top: 4px;
  right: 4px;
}

.shop-result-count {
  font-size: var(--fs-sm);
  color: var(--color-brown-mid);
  margin: 0;
}

.shop-result-count strong {
  color: var(--color-charcoal);
  font-weight: var(--fw-semibold);
}

/* View toggle */
.view-toggle {
  display: flex;
  gap: 2px;
  background-color: var(--bg-section-alt);
  border-radius: var(--radius-md);
  padding: 3px;
}

.view-btn {
  width: 32px;
  height: 32px;
  border-radius: calc(var(--radius-md) - 2px);
  background: transparent;
  border: none;
  color: var(--color-brown-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.view-btn.active {
  background-color: var(--bg-card);
  color: var(--color-charcoal);
  box-shadow: var(--shadow-sm);
}

/* Quick sort select */
.shop-sort-select {
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--color-charcoal);
  background-color: var(--bg-page);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23A8845E' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--transition-base);
}

.shop-sort-select:focus {
  border-color: var(--color-primary);
}


/* Sort label + responsive toolbar stacking */
.shop-sort-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shop-sort-label {
  font-size: var(--fs-xs);
  color: var(--color-brown-mid);
  white-space: nowrap;
}

@media (max-width: 576px) {
  .shop-toolbar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: var(--space-2);
  }

  .shop-toolbar-left {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
  }

  .shop-sort-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }

  .shop-sort-select {
    max-width: 100%;
    min-width: 0;
  }

  /* FIX (same failure mode as admin Order Details' "zoomed in on mobile"
     bug — a long unbroken search term echoed into .shop-result-count had
     no way to shrink or wrap: flex:0 0 auto kept .shop-toolbar-right at
     its full natural width and white-space:nowrap blocked wrapping,
     together forcing the toolbar, and the page, wider than the viewport). */
  .shop-toolbar-right {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
  }

  .shop-result-count {
    font-size: var(--fs-xs);
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

/* ------------------------------------------------------------
   6. ACTIVE FILTER PILLS
   ------------------------------------------------------------ */
.active-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background-color: var(--color-primary-xlight);
  border: 1px solid var(--color-primary-light);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-primary-dark);
}

.filter-pill i { font-size: 0.75rem; }

.filter-pill-remove {
  display: flex;
  align-items: center;
  color: var(--color-primary-dark);
  text-decoration: none;
  margin-left: 2px;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.filter-pill-remove:hover { opacity: 1; color: var(--color-danger); }


/* ============================================================
   PRODUCT GRID
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  gap: var(--space-5);
}

/* ── Badge ── */
.product-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  line-height: 1.3;
}

.product-badge--new      { background: #e8f5e9; color: #2e7d32; }
.product-badge--sale     { background: #fff3e0; color: #e65100; }
.product-badge--hot      { background: #fce4ec; color: #c62828; }
.product-badge--featured { background: #e8eaf6; color: #283593; }
.product-badge--out-of-stock { background: #f3f3f3; color: #666; }
/* Pre-order — products.is_preorder (admin toggle). Independent of the
   free-text Badge Label above (a product can show both at once). Amber/
   yellow (shared with --color-warning) so it reads as "needs waiting",
   not the neutral/informational tone blue would suggest. */
.product-badge--preorder { background: rgba(201,147,90,0.18); color: var(--color-warning); }

/* List view override */
.products-grid.list-view {
  grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
  display: grid;
  grid-template-columns: 160px 1fr;
}

.products-grid.list-view .product-card-img-wrap {
  width: 160px;
  min-width: 160px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  flex-shrink: 0;
}

.products-grid.list-view .product-card-img {
  object-fit: cover;
}

.products-grid.list-view .product-card-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  overflow: hidden;
}

/* List view footer — keep all buttons on one line */
.products-grid.list-view .product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding-top: 0.75rem;
  margin-top: auto;
  border-top: 1px solid var(--border-light);
}

.products-grid.list-view .product-card-footer-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.products-grid.list-view .btn-wishlist-card,
.products-grid.list-view .btn-add-cart,
.products-grid.list-view .btn-buy-now-card {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
}

.products-grid.list-view .btn-add-cart .btn-cart-label,
.products-grid.list-view .btn-buy-now-card .btn-cart-label {
  display: none;
}

/* Buy Now icon: hidden in grid (text shows), shown only in list view */
.btn-buy-now-card .btn-buy-icon {
  display: none;
}

.products-grid.list-view .btn-buy-now-card .btn-buy-icon {
  display: inline-block;
}

/* ── Shop-specific: reposition Eye + AR actions to bottom of image ──
   The View + AR choice appears when the card is hovered, or when a pill has keyboard focus, as it always did; on a
   touch screen a tap on the photo shows it (.actions-open, set by shop.js). The photo itself opens nothing (user ask
   2026-11-14: it used to open the image viewer when the visitor meant to open the product page; see
   views/partials/product-card.ejs). While the strip is hidden it ignores the pointer (the pills inherit that), so a
   tap on the bottom of the photo reveals the choice instead of silently following an invisible link. ── */
.products-grid .product-card-actions {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  opacity: 0;
  transform: translateY(6px);
  background: linear-gradient(to top, rgba(44,36,24,0.55) 0%, transparent 100%);
  border-radius: 0;
  transition: opacity var(--transition-base), transform var(--transition-base);
  z-index: 2;
  pointer-events: none;
}

.products-grid .product-card:hover .product-card-actions,
.products-grid .product-card-actions:focus-within {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Hover shows the choice on EVERY screen (a mouse in a phone-sized window, a touch laptop, DevTools phone mode included): the rule
   above has no media query on purpose. A finger is different: after a tap the browser leaves a fake "sticky hover" on the card that
   would turn the pills on in the middle of the tap, so the tap would land on a pill the visitor had not seen yet. shop.js puts
   .mh-touch on <html> after a real touch and takes it off at the next real mouse move; only while it is on is the hover ignored and
   a tap on the photo (.actions-open, set by shop.js) the way to show the choice. cursor:pointer (touch-only screens) is what lets iOS
   hand that tap to the page-level listener. */
@media (hover: none) {
  .products-grid .product-card-img-wrap {
    cursor: pointer;
  }
}

.mh-touch .products-grid .product-card:hover .product-card-actions {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.mh-touch .products-grid .product-card.actions-open .product-card-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.products-grid .product-action-btn {
  position: relative;
  width: auto;
  height: 30px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-full);
  background-color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--color-charcoal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  text-decoration: none;
  transition: all var(--transition-fast);
}

/* The visible pill stays 30px high; this invisible ring makes its tap area about 44px tall.
   The two pills sit side by side, so only up and down grow and the areas never meet. */
.products-grid .product-action-btn::after {
  content: "";
  position: absolute;
  inset: -7px 0;
}

.products-grid .product-action-btn:hover {
  background-color: var(--color-charcoal);
  color: var(--color-cream);
  border-color: var(--color-charcoal);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.products-grid .product-action-btn:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

/* Stagger override — reset since they're now side by side */
.products-grid .product-card-actions .product-action-btn:nth-child(1),
.products-grid .product-card-actions .product-action-btn:nth-child(2) {
  transition-delay: 0ms;
}

/* List view: the photo is 160px wide, so the strip and the pills are a little tighter */
.products-grid.list-view .product-card-actions {
  padding: var(--space-2);
}

.products-grid.list-view .product-action-btn {
  padding: 0 var(--space-2);
}

/* ── Product card alignment — equal height cards ── */
.products-grid .product-card {
  display: flex;
  flex-direction: column;
}

.products-grid .product-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-4) var(--space-3);
}

/* Category + badge row — always same height (min-height holds space) */
.product-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}
.product-card-meta .product-card-category {
  margin: 0;
}

/* ── Uniform image box for grid view ── */
.products-grid .product-card-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #ffffff;
  aspect-ratio: 1 / 1;
  /* Ensures the wrap never collapses even with broken images */
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  border-bottom: 1px solid var(--border-light);
}

.products-grid .product-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform 0.5s ease;
}

.products-grid .product-card:hover .product-card-img {
  transform: scale(1.04);
}

.products-grid .product-img-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ffffff 0%, var(--color-primary-xlight) 100%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 0;
  pointer-events: none;
}
.products-grid .product-img-placeholder i {
  font-size: 2.5rem;
  color: var(--color-stone);
}


/* Out-of-stock / disabled Add to Cart */
.btn-add-cart:disabled,
.btn-add-cart[disabled],
.btn-buy-now-card:disabled,
.btn-buy-now-card[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Product name — clamp to 2 lines so cards don't vary by name length */
.products-grid .product-card-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  margin-bottom: var(--space-3);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}


.products-grid .price {
  font-size: 1rem;
  line-height: 1;
}

.price-original-spacer {
  display: block;
  height: 0;
  visibility: hidden;
}

.products-grid .product-card-footer {
  margin-top: auto;
}

/* Product card rating */
.product-card-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  min-height: 1.5rem;
}

.stars {
  display: flex;
  gap: 1px;
}

.stars i {
  font-size: 0.7rem;
  color: var(--color-primary);
}

.stars .bi-star {
  color: var(--color-stone);
}

.rating-count {
  font-size: var(--fs-xs);
  color: var(--color-brown-light);
}

.sold-count {
  font-size: var(--fs-xs);
  color: var(--color-brown-light);
  white-space: nowrap;
  margin-left: auto;
}

.rating-star {
  font-size: 0.75rem;
  color: var(--color-primary);
}

.rating-value {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-charcoal);
}

/* Product prices — scoped to shop grid only (see .products-grid .product-prices below) */

/* ── Shop-specific: card footer refinements ── */
.products-grid .product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-2);
  flex-wrap: nowrap;
}

.products-grid .product-prices {
  gap: 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 58px;
  flex-shrink: 0;
}
/* Heart (wishlist) button */
.products-grid .btn-wishlist-card {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background-color: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--color-brown-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.products-grid .btn-wishlist-card:hover {
  background-color: #fff0ee;
  border-color: rgba(184,92,74,0.35);
  color: var(--color-danger);
  transform: scale(1.08);
}

.products-grid .btn-wishlist-card.active {
  background-color: #fff0ee;
  border-color: rgba(184,92,74,0.35);
  color: var(--color-danger);
}

/* Footer action group */
.products-grid .product-card-footer-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* Add to cart — icon-only, always (was full-label on desktop, which
   never fit alongside a labeled Buy Now + wishlist + price at any
   card width the grid actually produces) */
.products-grid .btn-add-cart {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-md);
  background-color: var(--color-charcoal);
  border: 1.5px solid var(--color-charcoal);
  color: var(--color-cream);
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.products-grid .btn-add-cart .btn-cart-label {
  display: none;
}
.products-grid .btn-add-cart:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.products-grid .btn-add-cart.added {
  background-color: var(--color-success);
  border-color: var(--color-success);
}

/* List view — icon-only cart */
.products-grid.list-view .btn-add-cart {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.products-grid.list-view .btn-add-cart .btn-cart-label {
  display: none;
}

/* Buy Now card button - black */
.btn-buy-now-card {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 34px;
  padding: 0 10px;
  background: var(--color-charcoal);
  color: var(--color-cream);
  border: 1.5px solid var(--color-charcoal);
  border-radius: var(--radius-md);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-buy-now-card .btn-cart-label {
  display: inline;
}

.btn-buy-now-card:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn-buy-now-card:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-buy-now-card .bi { font-size: 0.85rem; }

/* Price row - vertically centered
   NOTE: no `overflow: hidden` / `text-overflow: ellipsis` here — those were
   clipping 5-digit prices (e.g. ₱12,345) since min-width was smaller than
   the rendered text. min-width is just a floor; the row is free to grow. */
.products-grid .product-prices {
  gap: 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 58px;
  flex-shrink: 0;
}

.products-grid .price {
  white-space: nowrap;
  /* Override the base .price rule's overflow:hidden/ellipsis (line ~813) —
     that's what was cutting off 5-digit prices like ₱12,345. */
  overflow: visible;
  text-overflow: clip;
}

/* ------------------------------------------------------------
   8. EMPTY STATE
   ------------------------------------------------------------ */
.shop-empty {
  text-align: center;
  padding: var(--space-20) var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.shop-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  background-color: var(--color-primary-xlight);
  border: 1px solid var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--color-primary-dark);
}

.shop-empty-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-charcoal);
  margin: 0;
}

.shop-empty-desc {
  font-size: var(--fs-sm);
  color: var(--color-brown-light);
  margin: 0;
  max-width: 300px;
}


/* ------------------------------------------------------------
   9. MOBILE SIDEBAR OVERLAY
   ------------------------------------------------------------ */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(44,36,24,0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 576px) {
  .shop-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .shop-toolbar-left,
  .shop-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .shop-sort-wrap {
    flex: 1;
  }

}

/* ------------------------------------------------------------
   10. RESPONSIVE
   ------------------------------------------------------------ */
/* ============================================================
   RESPONSIVE - Sidebar (Search, Categories, Sort, Filters) stays
   directly on the page on mobile — always visible, no hidden drawer.
   ============================================================ */
@media (max-width: 991px) {
  .shop-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .shop-sidebar {
    position: static;
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow-y: visible;
  }

  .sidebar-mobile-header {
    display: none;
  }

  /* "Filters" button just jumps the page down to the sidebar,
     since the sidebar is always shown rather than hidden. */
  .btn-filter-toggle {
    display: inline-flex;
  }
}

@media (max-width: 576px) {
  .shop-sidebar {
    padding: 1rem;
  }
  
  .sidebar-cat-link {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  
  .sidebar-subcat-link {
    padding: 5px 8px 5px 14px;
    font-size: 0.75rem;
  }
}

/* ── Fix product AR action button — only show for AR-ready cards ── */
.product-card:not([data-ar="true"]) .product-action-btn--ar {
  display: none !important;
}

/* ============================================================
   PRODUCT CARD RESPONSIVENESS - FIX
   ============================================================ */

/* Tablet screens (768px - 991px) */
@media (max-width: 991px) {
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: var(--space-4);
  }
  
  .products-grid .product-card-name {
    font-size: 0.85rem;
  }
  
  .products-grid .price {
    font-size: 0.75rem;
  }
  
  .products-grid .product-prices {
    min-width: 46px;
  }
  
  .products-grid .product-card-footer-actions {
    gap: 4px;
  }
  
  .products-grid .btn-add-cart {
    width: 26px;
    height: 26px;
    min-width: 26px;
    padding: 0;
    justify-content: center;
    font-size: 0.7rem;
  }

  .products-grid .btn-add-cart .btn-cart-label {
    display: none;
  }

  /* Buy Now keeps its label at this breakpoint too, matching home's featured grid.
     Kept compact (small icon, tight padding/gap) so it doesn't crowd the card's edge. */
  .products-grid .btn-buy-now-card {
    width: auto;
    height: 26px;
    min-width: 26px;
    padding: 0 5px;
    justify-content: center;
    font-size: 0.55rem;
    gap: 3px;
  }

  .products-grid .btn-buy-now-card .btn-cart-label {
    display: inline;
  }

  .products-grid .btn-add-cart i,
  .products-grid .btn-buy-now-card i {
    font-size: 0.7rem;
  }
  
  .products-grid .btn-wishlist-card {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
  }
  
  .products-grid .sold-count {
    font-size: 0.6rem;
  }
  
  .products-grid.list-view .product-card-body {
    padding: 0.65rem 0.75rem;
  }

  .products-grid.list-view .product-card {
    grid-template-columns: 120px 1fr;
  }

  .products-grid.list-view .product-card-img-wrap {
    width: 120px;
    min-width: 120px;
  }

  .products-grid.list-view .btn-wishlist-card,
  .products-grid.list-view .btn-add-cart,
  .products-grid.list-view .btn-buy-now-card {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }

  /* The photo is only 120px wide here: View and AR show just their icon (the aria-label still names them) */
  .products-grid.list-view .product-action-btn {
    width: 32px;
    height: 32px;
    padding: 0;
  }

  .products-grid.list-view .product-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* Mobile screens (320px - 767px) */
@media (max-width: 767px) {
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
    gap: var(--space-3);
  }

  /* Narrow cards (the 2-up grid on a phone, the 158-172px strips on the Shop tab): tighter pills so View and AR sit side by side without clipping */
  .products-grid .product-card-actions {
    padding: var(--space-2);
  }

  .products-grid .product-action-btn {
    padding: 0 var(--space-2);
  }
  
  .products-grid .product-card-body {
    padding: var(--space-3) var(--space-2);
  }
  
  .product-card-meta {
    margin-bottom: 0.25rem;
  }
  
  .product-card-category {
    font-size: 0.6rem;
  }
  
  .product-badge {
    font-size: 0.5rem;
    padding: 0.1rem 0.35rem;
  }
  
  .products-grid .product-card-name {
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
    -webkit-line-clamp: 2;
    min-height: 2.2em;
  }
  
  .product-card-rating {
    margin-bottom: 0.5rem;
    gap: 0.25rem;
  }
  
  .stars i {
    font-size: 0.55rem;
  }
  
  .rating-count {
    font-size: 0.6rem;
  }
  
  .products-grid .price {
    font-size: 0.7rem;
  }
  
  .products-grid .product-prices {
    min-width: 38px;
  }
  
  .price-original {
    font-size: 0.6rem;
  }
  
  .product-card-footer {
    padding-top: 0.5rem;
    margin-top: 0;
    gap: 3px;
  }
  
  .products-grid .sold-count {
    font-size: 0.55rem;
  }
  
  .products-grid .product-card-footer-actions {
    gap: 2px;
    flex-wrap: nowrap;
  }
  
  .products-grid .btn-wishlist-card {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    font-size: 0.6rem;
  }
  
  .products-grid .btn-add-cart {
    width: 24px;
    height: 24px;
    min-width: 24px;
    padding: 0;
    justify-content: center;
    font-size: 0.6rem;
    flex-shrink: 0;
  }

  .products-grid .btn-add-cart .btn-cart-label {
    display: none;
  }

  .products-grid .btn-buy-now-card {
    height: 24px;
    min-width: 44px;
    padding: 0 6px;
    justify-content: center;
    font-size: 0.5rem;
    gap: 3px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: visible;
  }

  .products-grid .btn-buy-now-card .btn-cart-label {
    display: inline;
    font-size: 0.48rem;
    letter-spacing: 0.02em;
  }

  .products-grid .btn-buy-now-card i {
    font-size: 0.55rem;
  }
  
  .products-grid .btn-add-cart i {
    font-size: 0.65rem;
  }
}

/* Extra small screens (below 375px) */
@media (max-width: 375px) {
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: var(--space-2);
  }
  
  .products-grid .product-card-body {
    padding: var(--space-2) 0.6rem;
  }
  
  .product-card {
    max-width: 100%;
  }
  
  .products-grid .product-card-name {
    font-size: 0.75rem;
  }
  
  .products-grid .price {
    font-size: 0.65rem;
  }
  
  .products-grid .product-prices {
    min-width: 34px;
  }
  
  .products-grid .btn-wishlist-card {
    width: 22px;
    height: 22px;
    font-size: 0.55rem;
  }

  .products-grid .btn-add-cart {
    width: 22px;
    height: 22px;
    min-width: 22px;
    padding: 0;
    justify-content: center;
    font-size: 0.55rem;
  }

  .products-grid .btn-add-cart .btn-cart-label {
    display: none;
  }

  .products-grid .btn-buy-now-card {
    height: 22px;
    min-width: 38px;
    padding: 0 4px;
    justify-content: center;
    font-size: 0.42rem;
    gap: 2px;
    overflow: visible;
    white-space: nowrap;
  }

  .products-grid .btn-buy-now-card .btn-cart-label {
    display: inline;
    font-size: 0.4rem;
    letter-spacing: 0.02em;
  }

  .products-grid .btn-buy-now-card i {
    font-size: 0.5rem;
  }
}

/* Fix for very small phones (below 320px) */
@media (max-width: 320px) {
  .products-grid {
    gap: var(--space-2);
  }

  .products-grid .product-card-name {
    font-size: 0.7rem;
  }

  .products-grid .price {
    font-size: 0.6rem;
  }

  .products-grid .product-prices {
    min-width: 30px;
  }

  .products-grid .btn-add-cart {
    width: 20px;
    height: 20px;
    min-width: 20px;
    font-size: 0.5rem;
  }

  .products-grid .btn-buy-now-card {
    height: 20px;
    min-width: 34px;
    padding: 0 3px;
    gap: 1px;
    font-size: 0.38rem;
    overflow: visible;
    white-space: nowrap;
  }

  .products-grid .btn-buy-now-card .btn-cart-label {
    display: inline;
    font-size: 0.35rem;
  }

  .products-grid .btn-buy-now-card i {
    font-size: 0.45rem;
  }

  .products-grid .btn-wishlist-card {
    width: 20px;
    height: 20px;
    font-size: 0.5rem;
  }

  .products-grid .sold-count {
    font-size: 0.5rem;
  }
}
/* ── BACK TO TOP BUTTON ── */
.back-to-top {
  position: fixed;
  bottom: 80px; /* Increased from 2rem to avoid chat icon */
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-charcoal, #2c2418);
  color: var(--color-cream, #faf6f0);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--color-primary-dark, #6b4226);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

.back-to-top i {
  font-size: 1.2rem;
  line-height: 1;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .back-to-top {
    bottom: 70px; /* Increased for mobile */
    right: 1.25rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  }
  
  .back-to-top i {
    font-size: 1rem;
  }
}

@media (max-width: 375px) {
  .back-to-top {
    bottom: 65px; /* Increased for small phones */
    right: 1rem;
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
  
  .back-to-top i {
    font-size: 0.85rem;
  }
}

/* Optional: If chat icon is on the left instead */
/* If your chat icon is on the left, use this instead:
.back-to-top {
  bottom: 80px;
  right: 2rem;
}
*/