/* Demo shop — extends Breskvar system */

.shop-page {
  --shop-sticky-offset: 2.35rem;
}

.demo-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 0.55rem 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  background: var(--yellow);
  color: var(--green-deep);
}

.shop-page .site-header {
  top: var(--shop-sticky-offset);
}

.shop-page main {
  padding-bottom: 4rem;
}

.cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--green);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
}

.cart-toggle:hover {
  border-color: var(--green-mid);
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--green-deep);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.nav-cta.is-current {
  pointer-events: none;
}

.shop-hero {
  padding: 2.75rem 0 2rem;
  background: var(--paper-warm);
  border-bottom: 1px solid var(--line);
}

.shop-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--green);
}

.shop-hero h1::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 4px;
  margin-top: 0.85rem;
  background: var(--yellow);
}

.shop-hero p {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  max-width: 42ch;
  line-height: 1.55;
}

.shop-catalog {
  padding: 2.25rem 0 1rem;
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.75rem;
}

.shop-filter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green);
}

.shop-filter select {
  min-width: 12rem;
  height: 2.75rem;
  padding: 0 0.85rem;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.shop-result-count {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 2.75rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: stretch;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.product-media {
  display: block;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-warm);
  text-decoration: none;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.15rem 1.2rem 1.25rem;
  flex: 1;
  min-height: 0;
}

.product-cat {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-mid);
}

.product-body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--green);
}

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

.product-body h2 a:hover {
  color: var(--green-mid);
}

.product-size {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--green-mid);
}

.product-blurb {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
  flex: 1;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.product-price {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--green-deep);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.btn-sm {
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

.product-card .btn-ghost {
  background: transparent;
  color: var(--green);
  border-color: var(--line);
}

.product-card .btn-ghost:hover {
  border-color: var(--green);
  background: var(--paper-warm);
  color: var(--green-deep);
}

/* Product detail */

.product-main {
  padding-top: 1.75rem;
}

.product-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.product-crumb a {
  color: var(--green);
  text-decoration: none;
}

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

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.product-detail-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-warm);
  aspect-ratio: 4 / 3;
}

.product-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-detail-copy h1 {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--green);
}

.product-detail-price {
  margin: 1rem 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.85rem;
  color: var(--green-deep);
  font-variant-numeric: tabular-nums;
}

.product-detail-text {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  max-width: 42ch;
  line-height: 1.65;
}

.product-care {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.product-care li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.product-care li iconify-icon {
  color: var(--green);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.product-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1rem;
}

.product-qty {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green);
}

.product-qty input {
  width: 5.5rem;
  height: 3rem;
  padding: 0 0.75rem;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  box-sizing: border-box;
}

.product-buy .btn {
  height: 3rem;
  padding-inline: 1.25rem;
  box-sizing: border-box;
}

.product-demo-note {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.product-specs {
  margin-top: 3.5rem;
  max-width: 52rem;
  margin-inline: auto;
}

.product-specs-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-mid);
  text-align: center;
}

.product-specs-title::before {
  content: "";
  width: 2.75rem;
  height: 1px;
  background: var(--green-mid);
}

.product-specs-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.product-specs-list > div {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  gap: 1rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.product-specs-list dt {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

.product-specs-list dd {
  margin: 0;
  color: var(--ink-soft);
  text-align: right;
  line-height: 1.55;
}

.product-related {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.product-related h2 {
  margin: 0 0 1.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  color: var(--green);
}

.product-grid-related {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-missing {
  padding: 4rem 0;
}

.product-missing h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  color: var(--green);
}

/* Cart drawer */

.cart-open {
  overflow: hidden;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(14, 42, 26, 0.45);
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

.cart-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  height: 100%;
  background: var(--paper);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.cart-drawer-head,
.cart-drawer-foot {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.cart-drawer-foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cart-drawer-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--green);
}

.cart-close {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.cart-body {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.25rem;
}

.cart-empty {
  margin: 1rem 0;
  color: var(--ink-soft);
}

.cart-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-line-info {
  min-width: 0;
}

.cart-line-name {
  display: block;
  margin: 0;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.cart-line-name:hover {
  color: var(--green-mid);
}

.cart-line-meta,
.cart-line-sum {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.cart-line-sum {
  font-weight: 700;
  color: var(--green-deep);
  white-space: nowrap;
}

.cart-line-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--white);
}

.cart-line-qty button {
  width: 1.85rem;
  height: 1.85rem;
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cart-line-qty span {
  min-width: 1.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cart-remove {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.25rem;
  cursor: pointer;
}

.cart-total {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

.cart-total strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--green-deep);
}

.cart-drawer-foot .btn {
  width: 100%;
}

.cart-demo-note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 90;
  transform: translateX(-50%);
  max-width: calc(100% - 2rem);
  padding: 0.85rem 1.15rem;
  background: var(--green-deep);
  color: var(--white);
  font-weight: 600;
  border-radius: 2px;
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .product-grid,
  .product-grid-related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .product-specs-list > div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .product-specs-list dd {
    text-align: left;
  }

  .shop-page {
    --shop-sticky-offset: 0px;
  }

  .shop-page .site-header {
    top: 0;
  }

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

  .product-grid,
  .product-grid-related {
    grid-template-columns: 1fr;
  }

  .product-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .product-actions {
    margin-left: 0;
    width: 100%;
  }

  .product-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .cart-toggle {
    margin-top: 0.5rem;
    justify-content: center;
    width: 100%;
  }

  .shop-result-count {
    line-height: 1.4;
  }

  .cart-line {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "info remove"
      "qty sum";
  }

  .cart-line-info {
    grid-area: info;
  }

  .cart-line-qty {
    grid-area: qty;
  }

  .cart-line-sum {
    grid-area: sum;
    text-align: right;
  }

  .cart-remove {
    grid-area: remove;
    justify-self: end;
  }
}
