/* ============================================
   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;
  /* !important: Storefront's own style.css has
     ".hentry .entry-content a { text-decoration: underline; }" which
     out-specifies a plain .product-card rule (2 classes+element beats
     1 class), underlining the name/price/rating text painted through
     this card's child elements even though they compute to "none"
     individually. */
  text-decoration: none !important;
  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; }
.product-badge.out-of-stock { background: #6b6b6b; color: #fcfaf4; }

/* Out-of-stock card — image dimmed so the badge reads as the reason,
   not just a broken/loading image. */
.product-card.is-out-of-stock .product-image { filter: grayscale(65%); opacity: 0.7; }

/* 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;
  color: #1a1a1a !important;
}
.product-price .strike {
  color: #b0b0b0;
  text-decoration: line-through;
  font-size: 14px; font-weight: 600;
  margin-right: 8px;
}

/* Feel chip(s) (top-right) — a product can have more than one Effect value,
   placed side by side so neither one hides behind the other. */
.effect-chip-group {
  position: absolute; top: 10px; right: 10px; max-width: calc(100% - 20px);
  display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px;
}
.effect-chip {
  padding: 3px 8px;
  border-radius: 980px;
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.04em;
  border: 1.5px solid #1a1a1a;
  color: #1a1a1a;
  backdrop-filter: blur(4px);
  background: rgba(255, 248, 240, 0.92);
  white-space: nowrap;
}
.effect-chip::before { content:""; display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:5px; 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-group { top: 8px; right: 8px; gap: 4px; }
  .effect-chip { font-size: 8px; padding: 2px 7px; 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;
  }
}



/* ── hb-plus-btn — redirect button on product cards ── */
.hb-plus-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    border-radius: 50%;
    background: #1f5d3f;
    border: 2px solid #1a1a1a;
    box-shadow: 2px 2px 0 #1a1a1a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fcfaf4;
    font-size: 18px;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0;
    box-sizing: border-box;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}
.hb-plus-btn:hover,
.hb-plus-btn:focus,
.hb-plus-btn:active,
.hb-plus-btn:focus-visible {
    background: #1f5d3f;
    color: #fcfaf4;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #1a1a1a;
    outline: none;
    border-color: #1a1a1a;
}
.hb-plus-btn.is-disabled,
.hb-plus-btn:disabled {
    background: #ccc;
    border-color: #999;
    color: #6b6b6b;
    box-shadow: none;
    cursor: not-allowed;
}
.hb-plus-btn.is-disabled:hover,
.hb-plus-btn:disabled:hover {
    background: #ccc;
    color: #6b6b6b;
    transform: none;
    box-shadow: none;
}
@media (max-width: 767px) {
    .hb-plus-btn {
        width: 25px;
        height: 25px;
        min-width: 25px;
        max-width: 25px;
        min-height: 25px !important;
        font-size: 15px;
    }
}