/*!
 * Commerce — Bootstrap 6 e-commerce template
 * Theme layer. Loads after base.css; both are intentionally unlayered.
 */

/* Brand — base.css rebuilds the whole --bs-primary-* family from this token. */
:root {
  --brand: oklch(50% 0.14 32);
  --kit-section-y: 4.5rem;
}

@media (width >= 768px) {
  :root { --kit-section-y: 6rem; }
}

/* ---------------------------------------------------------------
   Announcement bar
   --------------------------------------------------------------- */

.announce {
  background: var(--bs-fg-body);
  color: var(--bs-bg-body);
  text-align: center;
  padding-block: 0.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.announce a {
  color: inherit;
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------------
   Product cards
   --------------------------------------------------------------- */

.product {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-media {
  position: relative;
  border-radius: var(--bs-radius-5);
  overflow: hidden;
  margin-bottom: 0.875rem;
}

.product-media .ph {
  transition: transform 0.4s ease;
}

.product:hover .product-media .ph {
  transform: scale(1.04);
}

.product-flag {
  position: absolute;
  top: 0.625rem;
  inset-inline-start: 0.625rem;
  z-index: 2;
}

.product-fav {
  position: absolute;
  top: 0.5rem;
  inset-inline-end: 0.5rem;
  z-index: 2;
  background: color-mix(in oklab, var(--bs-bg-body), transparent 8%);
  backdrop-filter: blur(6px);
}

.product-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.product-title a {
  color: inherit;
  text-decoration: none;
}

.product-title a:hover {
  text-decoration: underline;
}

.product-price {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.product-was {
  color: var(--bs-fg-3);
  text-decoration: line-through;
  font-weight: 400;
  font-size: 0.875em;
  margin-inline-start: 0.375rem;
}

/* Swatches */
.swatches {
  display: flex;
  gap: 0.3125rem;
  margin-top: 0.5rem;
}

.swatch {
  width: 0.875rem;
  height: 0.875rem;
  border-radius: var(--bs-radius-pill);
  border: 1px solid color-mix(in oklab, var(--bs-fg-body), transparent 80%);
}

/* ---------------------------------------------------------------
   Category tiles
   --------------------------------------------------------------- */

.cat-tile {
  position: relative;
  display: block;
  border-radius: var(--bs-radius-6);
  overflow: hidden;
  text-decoration: none;
  color: var(--bs-white);
}

.cat-tile .ph {
  transition: transform 0.4s ease;
}

.cat-tile:hover .ph {
  transform: scale(1.05);
}

.cat-tile-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem;
  background: linear-gradient(to top, rgb(0 0 0 / 62%), transparent);
  font-weight: 650;
  font-size: 1.0625rem;
}

/* ---------------------------------------------------------------
   Filter rail
   --------------------------------------------------------------- */

.filter-rail {
  position: sticky;
  top: 5.5rem;
}

.filter-group + .filter-group {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--bs-border-color);
}

.filter-group h3 {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bs-fg-3);
  margin-bottom: 0.875rem;
}

/* ---------------------------------------------------------------
   Product detail
   --------------------------------------------------------------- */

.gallery-main {
  border-radius: var(--bs-radius-6);
  overflow: hidden;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.625rem;
  margin-top: 0.625rem;
}

.gallery-thumb {
  border: 2px solid transparent;
  border-radius: var(--bs-radius-4);
  overflow: hidden;
  padding: 0;
  background: none;
  cursor: pointer;
}

.gallery-thumb.is-active {
  border-color: var(--bs-primary-base);
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-radius-pill);
  overflow: hidden;
}

.qty button {
  border: 0;
  background: none;
  width: 2.25rem;
  height: 2.5rem;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--bs-fg-2);
  cursor: pointer;
}

.qty button:hover {
  background: var(--bs-bg-2);
  color: var(--bs-fg-1);
}

.qty output {
  min-width: 2rem;
  text-align: center;
  font-weight: 600;
}

/* ---------------------------------------------------------------
   Checkout
   --------------------------------------------------------------- */

.summary {
  position: sticky;
  top: 5.5rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9375rem;
  padding-block: 0.375rem;
}

.summary-total {
  border-top: 1px solid var(--bs-border-color);
  margin-top: 0.75rem;
  padding-top: 0.875rem;
  font-weight: 700;
  font-size: 1.0625rem;
}

.mini-item {
  display: flex;
  gap: 0.875rem;
  align-items: center;
}

.mini-item .ph {
  width: 3.5rem;
  border-radius: var(--bs-radius-4);
  flex: none;
}

/* Checkout steps are plain sections toggled by JS */
.checkout-step[hidden] {
  display: none;
}

/* ---------------------------------------------------------------
   Trust row
   --------------------------------------------------------------- */

.trust {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (width >= 768px) {
  .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.trust-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.trust-item svg {
  flex: none;
  color: var(--bs-primary-base);
  margin-top: 0.125rem;
}

@media (prefers-reduced-motion: reduce) {
  .product-media .ph,
  .cat-tile .ph {
    transition: none;
  }
  .product:hover .product-media .ph,
  .cat-tile:hover .ph {
    transform: none;
  }
}
