/*
 * Enter any custom CSS here.
 * This file will not be overwritten by theme updates.
 *
 * ── Semantic class hooks (sa-*) ────────────────────────────────────────────
 * Every section, snippet and key element carries a stable `sa-` class you can
 * target with plain CSS — no Tailwind rebuild needed. These classes ship with
 * NO styles of their own; they exist purely as selectors for you to hook onto.
 *
 * Page scope   body.sa-tpl-<template>      e.g. .sa-tpl-product, .sa-tpl-shop
 *              body.sa-no-product-images / .sa-no-category-images when the
 *              matching theme setting is off
 * Chrome       .sa-header .sa-navbar .sa-footer
 *              .sa-navbar-link .sa-navbar-logo .sa-navbar-cart .sa-footer-link
 * Sections     .sa-<component>             e.g. .sa-hero, .sa-features, .sa-faq
 *   variant    .sa-<component>--<variant>  e.g. .sa-hero--split-media
 *   inner      .sa-<component>-title / -subtitle / -eyebrow / -media /
 *              -items / -item / -actions / -link / -price / -badge / -icon
 * Primitives   .sa-btn (+ .sa-btn--<variant>), .sa-section-header
 *              (.sa-section-title / -eyebrow / -subtitle),
 *              .sa-product-card (+ .sa-product-card--<style>,
 *              .sa-product-card-title / -price / -stock / -status / -badges),
 *              .sa-product-form + .sa-add-to-cart, .sa-product-gallery,
 *              .sa-cart-panel + .sa-cart-item, .sa-searchbar, .sa-pagination,
 *              .sa-breadcrumbs, .sa-toasts + .sa-toast, .sa-feedback-card
 *
 * Example — bigger hero heading only on the product page:
 *   .sa-tpl-product .sa-hero-title { font-size: 3rem; }
 * ───────────────────────────────────────────────────────────────────────────
*/

/* ===================================================================== */
/* PRODUCTS PAGE                                                         */
/* ===================================================================== */

/* Move everything up */
.sa-page-products {
  padding-top: 0.5rem !important;
  padding-bottom: 3rem !important;
}
/* hide the big page title so the filters + cards start at the very top */
.sa-page-products .sa-section-header {
  display: none !important;
}

/* Wider container = bigger cards */
.sa-page-products .wrap {
  max-width: min(1840px, 97vw) !important;
}
@media (min-width: 1024px) {
  /* narrower filter sidebar so the grid gets more room */
  .sa-page-products .lg\:grid-cols-\[15rem_minmax\(0\,1fr\)\] {
    grid-template-columns: 15rem minmax(0, 1fr) !important;
  }
  /* always 4 cards per line on desktop */
  .sa-page-products .grid.grid-cols-1 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.75rem !important;
  }
}

/* Bigger card content */
.sa-page-products .sa-product-card-title {
  font-size: 1.2rem;
}
.sa-page-products .sa-product-card-price {
  font-size: 1.15rem;
}
.sa-page-products .sa-product-card > div:last-child {
  padding: 1.5rem;
}

/* Image blur on hover (starts after 0.2s) - image only, not the whole card */
.sa-page-products .sa-product-card-media img {
  transition: filter 0.3s ease 0s, transform 0.3s ease, opacity 0.15s ease;
}
.sa-page-products .sa-product-card:hover .sa-product-card-media img {
  filter: blur(1px);
  transition: filter 0.3s ease 0.2s, transform 0.3s ease, opacity 0.15s ease;
}

/* Out-of-stock products: image slightly blurry all the time */
.sa-page-products .sa-product-card:has(.sa-product-card-stock .text-error) .sa-product-card-media img {
  filter: blur(1px);
}

/* Bigger product image (title sits lower) */
.sa-page-products .sa-product-card--showcase .aspect-product-card-image,
.sa-page-products .sa-product-card--showcase .aspect-group-card-image {
  aspect-ratio: 4 / 3;
}

/* Product badges move to the bottom of the image (top corners are used by status + stock) */
.sa-page-products .sa-product-card-badges {
  top: auto !important;
  bottom: 0.5rem !important;
}

/* Category list: selected state (managed by custom.js so many can be selected) */
.sa-page-products .sa-cat-link.is-selected {
  background: color-mix(in srgb, rgb(var(--cl-accent)) 10%, transparent);
  color: var(--cl-accent-text) !important;
}
.sa-page-products .sa-cat-link.is-selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.375rem;
  bottom: 0.375rem;
  width: 2px;
  border-radius: 9999px;
  background: rgb(var(--cl-accent));
}
.sa-page-products .sa-cat-link.is-selected .sa-cat-icon { color: var(--cl-accent-text); }

/* Subcategory PNGs: show the full picture, no crop, no grey box */
.sa-page-products .sa-cat-thumb.is-png {
  background: transparent !important;
  overflow: visible;
}
.sa-page-products .sa-cat-thumb.is-png img {
  object-fit: contain;
  filter: none;
}
.sa-page-products.is-loading-cards .grid.grid-cols-1 { opacity: 0.5; transition: opacity 0.2s; }

/* Category tree: dropdown subcategories */
.sa-page-products .sa-cat-chev {
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: 0.25rem;
  border-radius: 0.375rem;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}
.sa-page-products .sa-cat-link > .truncate + .sa-cat-chev { margin-left: auto; }
.sa-page-products .sa-cat-chev:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.sa-page-products .sa-cat-group.has-kids > .sa-cat-link > .sa-cat-chev,
.sa-page-products .sa-cat-group.kids-unknown > .sa-cat-link > .sa-cat-chev { display: inline-flex; }
.sa-page-products .sa-cat-group.is-open > .sa-cat-link > .sa-cat-chev { transform: rotate(180deg); }
.sa-page-products .sa-cat-children {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 4px 1.15rem;
  border-left: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}
.sa-page-products .sa-cat-group.is-open > .sa-cat-children { display: flex; }
.sa-page-products .sa-cat-children .sa-cat-link { padding-left: 0.5rem !important; }

/* Products page: no breadcrumbs, no filter chips */
.sa-tpl-products .sa-breadcrumbs,
.sa-page-products .sa-filter-chips { display: none !important; }

/* Home page: the extra "Our products" block is only for the products page */
.sa-tpl-shop [data-component-id="products-1790976953178"] { display: none !important; }

/* Logo cloud: bigger logos */
.sa-logo-cloud-item img {
  height: 2.5rem !important;
  max-width: 11rem !important;
}
@media (min-width: 640px) {
  .sa-logo-cloud-item img { height: 3rem !important; max-width: 12rem !important; }
}
.sa-logo-cloud-item span { font-size: 1.35rem; }

/* Slightly softer glow everywhere */
.pfx-gs-soft { --pfx-glow-a: 0.07; }
.pfx-gs-medium { --pfx-glow-a: 0.13; }
.pfx-gs-strong { --pfx-glow-a: 0.2; }
.hero-bg-glow { opacity: 0.75; }
.sfx-glow { opacity: 0.75; }
.bglow:not(.bs-soft) .btn-primary:not(:disabled) {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 4px 24px rgba(var(--cl-accent), 0.24);
}
.bglow:not(.bs-soft) .btn-primary:hover:not(:disabled) {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 6px 32px rgba(var(--cl-accent), 0.32);
}
.btn-glow { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 24px rgba(var(--cl-accent), 0.24); }
.btn-glow:hover { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 32px rgba(var(--cl-accent), 0.32); }

/* ===================================================================== */
/* "All products" row: glowing star (no box) + live product counter      */
/* ===================================================================== */
.sa-page-products .sa-all-star svg {
  width: 19px;
  height: 19px;
  color: #ffb23e;
  filter: drop-shadow(0 0 5px rgba(255, 140, 0, 0.55));
  transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1), filter 0.25s, color 0.2s;
}
.sa-page-products .sa-cat-all:hover .sa-all-star svg {
  transform: rotate(18deg) scale(1.12);
  filter: drop-shadow(0 0 8px rgba(255, 140, 0, 0.8));
}
.sa-page-products .sa-cat-all.is-selected .sa-all-star svg {
  color: #ff9a1f;
  filter: drop-shadow(0 0 7px rgba(255, 120, 0, 0.75));
}
.sa-page-products .sa-all-count {
  min-width: 1.6rem;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--cl-accent-text);
  background: color-mix(in srgb, rgb(var(--cl-accent)) 14%, transparent);
  border: 1px solid color-mix(in srgb, rgb(var(--cl-accent)) 30%, transparent);
}
.sa-page-products .sa-all-count:empty { display: none; }

/* ===================================================================== */
/* Category list: own scrollbar                                          */
/* ===================================================================== */
@media (min-width: 1024px) {
  .sa-page-products aside [data-cat-nav] {
    max-height: calc(100vh - 17rem);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding-right: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--cl-accent), 0.45) transparent;
  }
  .sa-page-products aside [data-cat-nav]::-webkit-scrollbar { width: 6px; }
  .sa-page-products aside [data-cat-nav]::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
  }
  .sa-page-products aside [data-cat-nav]::-webkit-scrollbar-thumb {
    background: rgba(var(--cl-accent), 0.4);
    border-radius: 9999px;
  }
  .sa-page-products aside [data-cat-nav]::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--cl-accent), 0.75);
  }
}

/* ===================================================================== */
/* Subcategory images: no box, no background, no crop                    */
/* ===================================================================== */
.sa-page-products .sa-cat-thumb {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
.sa-page-products .sa-cat-thumb img {
  object-fit: contain !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

/* ===================================================================== */
/* Navbar: wide; no box at the very top, box appears after scrolling     */
/* ===================================================================== */
#navbar.sa-navbar--pills > div { padding-left: 0.75rem; padding-right: 0.75rem; }
#navbar.sa-navbar--pills .max-w-container {
  max-width: min(1840px, 97vw) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease,
              backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}
#navbar.sa-navbar--pills:not(.nav-scrolled) .max-w-container {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
