/* =========================================================
   Product cards with pack sizes (home carousel + shop page)
   Uses blog.css tokens (--bl-*)
   ========================================================= */
/* ---------- Products (with pack sizes) ---------- */

.pt-card {
  position: relative;
  background: #fff;
  border-radius: 22px;
  border: 1px solid #f1e4dc;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .05);
  overflow: hidden;
  display: flex; flex-direction: column;
  margin: 0;
  container-type: inline-size;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.pt-card:hover { transform: translateY(-5px); box-shadow: 0 22px 50px rgba(0, 0, 0, .1); border-color: rgba(241, 79, 15, .35); }

/* Product photos are 600x600 squares on white: a square white frame shows them edge to edge, uncropped */
.pt-media {
  position: relative; display: block;
  aspect-ratio: 1 / 1;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid #f1e4dc;
}
.pt-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; padding: 0; transition: transform .5s ease; }
.pt-card:hover .pt-media img { transform: scale(1.05); }
.pt-tag, .pt-save {
  position: absolute; top: 12px;
  border-radius: 999px; padding: 5px 11px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.pt-tag { left: 12px; background: var(--bl-black); color: #fff; }
.pt-save { right: 12px; background: #16a34a; color: #fff; box-shadow: 0 6px 14px rgba(22, 163, 74, .3); }

.pt-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.pt-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pt-title-row h3 { font-size: 20px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.pt-title-row h3 a { color: var(--bl-ink); }
.pt-title-row h3 a:hover { color: var(--bl-orange); }
.pt-stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #146c43; white-space: nowrap; }
.pt-stock span { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }

/* Pack chips */
.pt-packs { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.pt-packs legend {
  float: none; width: auto; padding: 0; margin: 0 0 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bl-muted);
}
.pt-pack-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pt-pack { position: relative; margin: 0; cursor: pointer; }
.pt-pack input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pt-pack span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 52px;
  border: 1.5px solid #ece4de; border-radius: 12px;
  background: #fff;
  font-size: 16px; font-weight: 800; color: var(--bl-ink); line-height: 1.1;
  transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
}
.pt-pack small { font-size: 10px; font-weight: 600; color: var(--bl-muted); text-transform: uppercase; letter-spacing: .06em; }
.pt-pack:hover span { border-color: rgba(241, 79, 15, .5); }
.pt-pack input:checked + span {
  border-color: var(--bl-orange); background: var(--bl-orange-soft); color: var(--bl-orange);
  box-shadow: 0 0 0 3px rgba(241, 79, 15, .12);
}
.pt-pack input:checked + span small { color: var(--bl-orange); }
.pt-pack input:focus-visible + span { outline: 2px solid var(--bl-orange); outline-offset: 2px; }

/* Price + actions */
.pt-foot {
  margin-top: auto;
  padding-top: 18px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.pt-packs + .pt-foot { margin-top: 18px; border-top: 1px dashed #ece4de; }
.pt-price strong { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--bl-ink); line-height: 1.1; }
.pt-price strong.is-bump { animation: pt-bump .35s ease; }
.pt-price span { font-size: 12px; color: var(--bl-muted); }
.pt-actions { display: flex; align-items: center; gap: 8px; }
.pt-icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid #ece4de; color: var(--bl-ink); font-size: 15px;
  transition: border-color .2s, color .2s;
}
.pt-icon-btn:hover { border-color: var(--bl-ink); color: var(--bl-ink); }
.pt-add { padding: 12px 18px; font-size: 14px; white-space: nowrap; }

@keyframes pt-bump { 0% { transform: scale(1); } 40% { transform: scale(1.08); color: var(--bl-orange); } 100% { transform: scale(1); } }

/* Narrow cards: price on its own row, buttons full width underneath */
@container (max-width: 360px) {
  .pt-body { padding: 16px 16px 18px; }
  .pt-foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .pt-price { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .pt-price strong { font-size: 26px; }
  .pt-actions { width: 100%; }
  .pt-add { flex: 1; justify-content: center; padding: 13px 16px; }
  .pt-icon-btn { flex: none; }
  .pt-pack span { height: 48px; font-size: 15px; }
}
@container (max-width: 280px) {
  .pt-pack-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  .pt-title-row h3 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-card, .pt-media img { transition: none; }
  .pt-price strong.is-bump { animation: none; }
}

/* ---------- Products carousel ---------- */
.pt-head-actions { display: flex; align-items: center; gap: 20px; }
.pt-nav { display: flex; gap: 10px; }
.pt-arrow {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bl-ink); background: #fff; color: var(--bl-ink);
  font-size: 16px; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, opacity .2s;
}
.pt-arrow:hover:not(:disabled) { background: var(--bl-orange); border-color: var(--bl-orange); color: #fff; }
.pt-arrow:disabled { opacity: .3; cursor: default; }

.pt-carousel { position: relative; margin: 0 -8px; }
.pt-track {
  --pt-gap: 26px;
  --pt-per: 3;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--pt-per) - 1) * var(--pt-gap)) / var(--pt-per));
  column-gap: var(--pt-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 8px;
  padding: 10px 8px 26px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pt-track::-webkit-scrollbar { display: none; }
.pt-track:focus-visible { outline: 2px solid var(--bl-orange); outline-offset: 4px; border-radius: 24px; }
.pt-track > .pt-card { scroll-snap-align: start; }

.pt-dots { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.pt-dot {
  width: 9px; height: 9px; border-radius: 999px; border: 0; padding: 0;
  background: #e6d9d0; cursor: pointer;
  transition: width .3s, background .3s;
}
.pt-dot.is-active { width: 28px; background: var(--bl-orange); }

@media (max-width: 991px) {
  .pt-track { --pt-per: 2; --pt-gap: 20px; }
}
@media (max-width: 575px) {
  /* one card plus a peek of the next */
  .pt-track { --pt-gap: 14px; grid-auto-columns: 84%; }
  .pt-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-dot { transition: none; }
}

