/* ============================================
   cards.css — canonical product-card component
   Shared across grid pages AND bottom sections
   (recs / "you might also like" / favorites / cart recs)
   so every product card on the site is identical.
   Extracted from flower.css. The dev should map this to
   ONE WooCommerce product-card template at build.
   ============================================ */

.product-card {
  background: #fff;
  border: 3px solid #1a1a1a;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit; display: block;
}
.product-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 #1a1a1a;
}
.product-image {
  position: relative;
  /* Square crop matches WooCommerce's default 1:1 catalog thumbnail, so a
     square product photo crops the same way at every card width. Do NOT use a
     fixed pixel height: with a fluid card width that distorts the crop. */
  aspect-ratio: 1 / 1;
  border-bottom: 3px solid #1a1a1a;
  background-size: cover; background-position: center;
}
/* Win over the per-page copy-pasted mobile `.product-image { height: Npx !important }`
   normalization rules (higher specificity + !important keeps the crop square). */
.recs-grid .product-image,
.related-grid .product-image {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
}
.product-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 12px;
  background: #1a1a1a; color: #fcfaf4;
  border-radius: 980px;
  font-size: 11px; font-weight: 800;
  transform: rotate(-3deg);
}
.product-badge.sale { background: #ff6b35; color: #1a1a1a; }

/* Strain type chip (upper right, used on some cards) */
.strain-chip {
  position: absolute; top: 12px; right: 12px;
  padding: 5px 12px;
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: blur(4px);
  border: 2px solid #1a1a1a;
  border-radius: 980px;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: #1a1a1a;
}
.strain-chip.indica { background: #c5a0f7; }
.strain-chip.sativa { background: #ffd56b; }
.strain-chip.hybrid { background: #7fb069; color: #1a1a1a; }

.product-body { padding: 20px; }
.product-name {
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.2;
}
.product-meta {
  font-size: 13px; color: #6b6b6b;
  margin-bottom: 14px;
  display: flex; gap: 12px;
  flex-wrap: wrap;
}
.product-meta span { display: inline-flex; align-items: center; gap: 4px; }
.product-rating {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #6b6b6b;
}
.product-rating .stars { color: #ff6b35; letter-spacing: 1px; }
.card-weights { display:flex; flex-wrap:wrap; gap:5px; margin:2px 0 10px; }
.card-weights span { font-size:10.5px; font-weight:700; padding:2px 8px; border:1.5px solid #e2dccd; border-radius:980px; color:#6b6b6b; background:#faf7f0; }
.product-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 2px dashed #e0d8c8;
  padding-top: 14px;
}
.product-footer-row { gap: 10px; }
.product-price {
  font-size: 20px; font-weight: 900;
  letter-spacing: -0.02em;
}
.product-price .strike {
  color: #b0b0b0;
  text-decoration: line-through;
  font-size: 14px; font-weight: 600;
  margin-right: 8px;
}

/* Feel chip (upper right) */
.effect-chip {
  position: absolute; top: 12px; right: 12px;
  padding: 5px 12px;
  border-radius: 980px;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em;
  border: 2px solid #1a1a1a;
  color: #1a1a1a;
  backdrop-filter: blur(4px);
  background: rgba(255, 248, 240, 0.92);
}
.effect-chip::before { content:""; display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:6px; background:#1a1a1a; vertical-align:middle; }
.effect-chip.effect-chill::before { background: #4FA8D8; }
.effect-chip.effect-sleep::before { background: #8A6FC0; }
.effect-chip.effect-focus::before { background: #F0682E; }
.effect-chip.effect-social::before { background: #D99A2B; }
.effect-chip.effect-energy::before { background: #D4B800; }
.effect-chip.effect-relief::before { background: #E85D75; }
.effect-chip.effect-happy::before { background: #E0A93C; }
.effect-chip.effect-creative::before { background: #3F8C4F; }
.effect-chip.effect-aroused::before { background: #C9344F; }
.effect-chip.effect-soothing::before { background: #5E9DB5; }

/* Add-to-cart morphing qty stepper */
.card-add-control {
  display: inline-flex;
  align-items: center;
  border: 2px solid #1a1a1a;
  background: #1f5d3f;
  border-radius: 999px;
  box-shadow: 2px 2px 0 #1a1a1a;
  overflow: hidden;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  flex-shrink: 0;
  height: 36px;
}
.card-add-control:hover { box-shadow: 3px 3px 0 #1a1a1a; transform: translate(-1px, -1px); }
.card-add-control .card-add-minus,
.card-add-control .card-add-plus {
  appearance: none; background: transparent; border: none; padding: 0; margin: 0;
  color: #fcfaf4; font: inherit; font-size: 18px; font-weight: 800; line-height: 1;
  cursor: pointer; height: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.card-add-control .card-add-plus { width: 32px; }
.card-add-control .card-add-plus iconify-icon { font-size: 18px; }
.card-add-control .card-add-minus { width: 30px; font-size: 22px; }
.card-add-control .card-add-minus:hover,
.card-add-control .card-add-plus:hover { background: rgba(255, 248, 240, 0.14); }
.card-add-control .card-add-qty {
  min-width: 22px; padding: 0 4px; text-align: center;
  font-size: 14px; font-weight: 800; color: #fcfaf4; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.card-add-control[data-qty="0"] { width: 36px; height: 36px; border-radius: 50%; }
.card-add-control[data-qty="0"] .card-add-minus,
.card-add-control[data-qty="0"] .card-add-qty { display: none; }
.card-add-control[data-qty="0"] .card-add-plus { width: 100%; height: 100%; }

@media (max-width: 640px) {
  .effect-chip { font-size: 9px; padding: 3px 8px; top: 8px; right: 8px; border-width: 1px; }
}
@media (max-width: 480px) {
  /* 44px touch target on phones (Apple/Google minimum) */
  .card-add-control { height: 44px; }
  .card-add-control[data-qty="0"] { width: 44px; height: 44px; }
  .card-add-control .card-add-plus { width: 44px; }
  .card-add-control .card-add-minus { width: 38px; }
}

/* Mobile: each page turns the recs / related grid into a horizontal swipe
   rail (display:flex). Give .product-card a swipeable basis + snap. In the
   non-rail (2-col grid) contexts these flex props are ignored, so this is
   safe everywhere a .product-card lives. */
@media (max-width: 768px) {
  .recs-grid .product-card,
  .related-grid .product-card {
    flex: 0 0 74%;
    scroll-snap-align: start;
  }
}
