/*
 * Shared product-display components — used by the homepage's category
 * tabs/bestsellers, the shop/category archive, and the single-product
 * page's related-products row + reviews. Kept in one file so a change
 * here doesn't need repeating in every page's own stylesheet.
 */

.product-card{ background:var(--surface-high); border-radius:var(--r-md); overflow:hidden; box-shadow:var(--elev1); display:flex; flex-direction:column; border:1px solid var(--outline-soft); transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease; text-decoration:none; color:inherit; }
.product-card .art{ aspect-ratio:1; position:relative; overflow:hidden; background-color:var(--surface-variant); background-size:cover; background-position:center; transition:background-size .3s ease; }
.product-card .art img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .3s ease; }
.product-card .body{ padding:var(--sp-3) var(--sp-4) var(--sp-4); display:flex; flex-direction:column; gap:6px; }
.product-card .name{ font-family:var(--display-face); font-weight:600; font-size:15.5px; }
.product-card .desc{ font-size:12px; color:var(--on-surface-variant); }
.product-card .foot{ display:flex; align-items:center; justify-content:space-between; margin-top:6px; }
.product-card .price{ font-weight:700; font-size:14.5px; }
.product-card .price small{ font-weight:500; font-size:11px; color:var(--on-surface-variant); }
.product-card .price del{ font-size:11.5px; font-weight:500; color:var(--on-surface-variant); text-decoration:line-through; margin-inline-end:6px; }
.product-card .price ins{ text-decoration:none; }
.product-card .add{ width:32px; height:32px; border-radius:var(--r-sm); border:1.5px solid var(--outline); background:transparent; color:var(--primary); font-size:18px; cursor:pointer; transition:background .15s ease, color .15s ease, border-color .15s ease; }
@media (hover:hover) and (pointer:fine){
	.product-card:hover{ transform:translateY(-3px); box-shadow:var(--elev2); border-color:var(--outline); }
	.product-card:hover .art img{ transform:scale(1.06); }
	.product-card:hover .art{ background-size:112%; }
	.product-card .add:hover{ background:var(--primary); color:var(--on-primary); border-color:transparent; }
}
.badge{ position:absolute; top:8px; inset-inline-start:8px; font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:var(--r-sm); }
.badge.best{ background:var(--caramel-container); color:var(--on-caramel-container); }
.badge.fresh{ background:var(--olive-container); color:var(--on-olive-container); }
.badge.sale{ background:var(--accent); color:#fff; }
.badge.outofstock{ background:rgba(15,45,43,.82); color:#fff; }

/* horizontal-scroll row of product cards — homepage bestsellers row and
   single-product.php's related-products row both use this. */
.best-row{ display:flex; gap:var(--sp-4); overflow-x:auto; padding-bottom:var(--sp-3); }
.best-row::-webkit-scrollbar{ height:6px; } .best-row::-webkit-scrollbar-thumb{ background:var(--outline-soft); border-radius:4px; }
.best-row .product-card{ flex:0 0 190px; }

/* out-of-stock: grayscale + no hover lift, so it visually recedes and
   reads as unavailable without needing extra copy beyond the badge. */
.product-card.out-of-stock .art img{ filter:grayscale(1); }
.product-card.out-of-stock:hover{ transform:none; box-shadow:var(--elev1); }
.product-card.out-of-stock .oos-label{ font-size:12px; font-weight:600; color:var(--on-surface-variant); }

.cat-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:var(--sp-4); }

.cat-empty{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; padding:var(--sp-8) var(--sp-4); color:var(--on-surface-variant); }
.cat-empty svg{ width:34px; height:34px; opacity:.5; }
.cat-empty b{ color:var(--on-surface); font-size:14.5px; }
.cat-empty span{ font-size:13px; max-width:34ch; }

/* review carousel — used by single-product.php's real per-product
   reviews (moved out of front-page.css, where the equivalent homepage
   section is still commented out/dormant pending real testimonials). */
.review-carousel-wrap{ display:flex; align-items:center; gap:var(--sp-3); }
.review-carousel{ display:flex; gap:var(--sp-4); overflow-x:auto; scroll-snap-type:x mandatory; scroll-behavior:smooth; padding-bottom:4px; flex:1; min-width:0; cursor:grab; }
.review-carousel::-webkit-scrollbar{ display:none; }
.review-carousel.dragging{ cursor:grabbing; user-select:none; scroll-behavior:auto; }
.review-card{ scroll-snap-align:start; flex:0 0 84%; max-width:320px; background:var(--surface-high); border:1px solid var(--outline-soft); border-radius:var(--r-md); padding:var(--sp-4); display:flex; flex-direction:column; gap:10px; }
.stars{ color:var(--caramel); font-size:13px; letter-spacing:2px; }
.review-card p{ font-size:13.5px; }
.review-who{ display:flex; align-items:center; gap:8px; }
.review-avatar{ width:28px; height:28px; border-radius:50%; background:var(--olive-container); color:var(--on-olive-container); font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; }
.review-who span{ font-size:12.5px; color:var(--on-surface-variant); }
.rv-arrow{ flex:0 0 auto; width:36px; height:36px; border-radius:50%; border:1px solid var(--outline-soft); background:var(--surface-high); color:var(--on-surface); font-size:18px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.rv-arrow:hover{ background:var(--surface-variant); }
.rv-dots{ display:flex; justify-content:center; gap:6px; margin-top:var(--sp-4); }
.rv-dots .dot{ width:7px; height:7px; border-radius:4px; background:var(--outline); cursor:pointer; border:none; padding:0; }
.rv-dots .dot.active{ background:var(--primary); width:18px; }
.review-empty{ font-size:13.5px; color:var(--on-surface-variant); }
@media (min-width:700px){ .review-card{ flex:0 0 calc(33.333% - 11px); max-width:none; } }
@media (max-width:640px){ .rv-arrow{ display:none; } }
