/* =========================================================
   KONIRY — SHOP
   The reusable product-card component (used on the homepage,
   shop, category archives, related products, upsells, and search),
   the shop archive layout, filter sidebar/drawer, and WooCommerce's
   native loop/pagination/button/message styling.
   ========================================================= */

/* reusable product card + grid */
/* products */
.prod-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:54px}
.prod-grid.cols-4{grid-template-columns:repeat(4,1fr)}
.prod{background:var(--sand);border-radius:var(--r-lg);overflow:hidden;display:flex;flex-direction:column;transition:.3s;position:relative}
.prod:hover{transform:translateY(-6px);box-shadow:var(--shadow)}
.prod .ph{position:relative;overflow:hidden;background:#EFEAE0;display:block}
.prod .ph img{height:340px;width:100%;object-fit:cover;transition:transform .8s ease}
.prod:hover .ph img{transform:scale(1.05)}
.ph-link{position:relative;display:block}
.ph-link .ph-img-hover{position:absolute;inset:0;height:340px;width:100%;object-fit:cover;opacity:0;transition:opacity .35s ease}
.ph-link.has-hover:hover .ph-img-main{opacity:0}
.ph-link.has-hover:hover .ph-img-hover{opacity:1}
.tag{position:absolute;top:18px;left:18px;background:#fff;font-size:12px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;padding:8px 16px;border-radius:var(--r-pill);z-index:2}
.tag.dark{background:var(--accent);color:#fff}
.prod-body{padding:30px;display:flex;flex-direction:column;flex:1}
.prod-cat{font-size:11.5px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:var(--accent);margin-bottom:8px}
.prod-body h3{font-size:22px;margin-bottom:8px}
.prod-body h3 a{text-decoration:none}
.prow{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:auto;padding-top:16px}
.price{font-size:21px;font-weight:700}
.price s,.price del{font-size:15px;color:#A9A498;font-weight:400;margin-right:8px}
.price ins{text-decoration:none}
.prod .btn{padding:13px 26px;font-size:14.5px}
.prod-rating{font-size:12.5px;color:var(--body);margin-bottom:6px;display:flex;align-items:center;gap:6px}
.prod-rating .stars{font-size:12.5px}
.prod-rating-count{color:var(--body)}
.out-of-stock-flag{position:absolute;top:18px;right:18px;background:var(--ink);color:#fff;font-size:11px;font-weight:700;letter-spacing:1px;text-transform:uppercase;padding:6px 14px;border-radius:var(--r-pill);z-index:2}

/* WooCommerce: product loop, pagination, star rating, message boxes */
/* ---------- WooCommerce: general ---------- */
.woocommerce ul.products,.woocommerce-page ul.products{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin:54px 0 0}
.woocommerce ul.products li.product,.woocommerce-page ul.products li.product{width:auto;margin:0;float:none;clear:none;padding:0}
.woocommerce span.onsale{position:absolute;top:18px;left:18px;background:var(--accent);color:#fff;font-size:12px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;padding:8px 16px;border-radius:var(--r-pill);min-height:0;min-width:0;line-height:1;z-index:2}
.woocommerce nav.woocommerce-pagination ul{display:flex;gap:10px;list-style:none;justify-content:center;border:none}
.woocommerce nav.woocommerce-pagination ul li{border:none}
.woocommerce nav.woocommerce-pagination ul li a,.woocommerce nav.woocommerce-pagination ul li span{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;border-radius:var(--r-pill);background:var(--sand);font-weight:600;border:none}
.woocommerce nav.woocommerce-pagination ul li span.current{background:var(--accent);color:#fff}
/* Unified star rating (koniry_custom_rating_html filter replaces WC's
   default icon-font markup with plain Unicode stars — see inc/woocommerce.php
   for why: it removes any dependency on woocommerce-general's icon font). */
.woocommerce .star-rating,.koniry-stars{color:#F4C95D;font-size:14px;letter-spacing:2px;line-height:1;display:inline-block}
.woocommerce-message,.woocommerce-info,.woocommerce-error,.woocommerce-noreviews{background:var(--sage);border:none;border-radius:var(--r-md);padding:20px 24px;list-style:none;font-size:14.5px;color:var(--ink);margin-bottom:24px}
.woocommerce-error{background:#F6DEDB}
.woocommerce-message a.button,.woocommerce-error a.button{background:var(--accent);color:#fff;border-radius:var(--r-pill);padding:10px 20px;text-decoration:none;margin-left:12px}

/* buttons rendered by WooCommerce (add to cart, checkout, etc.) */
/* buttons rendered by WooCommerce (add to cart, checkout, etc.) */
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,
.woocommerce #respond input#submit,.woocommerce-page a.button,.woocommerce-page button.button{
  display:inline-flex;align-items:center;gap:10px;background:var(--accent);color:#fff;
  padding:15px 30px;border-radius:var(--r-pill);font-size:14.5px;font-weight:600;
  border:none;cursor:pointer;font-family:inherit;transition:.3s;text-decoration:none;text-transform:none;
}
.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover{background:var(--accent-hover);color:#fff}
.woocommerce a.button.loading,.woocommerce button.button.loading{opacity:.6}
.woocommerce a.added_to_cart{margin-left:12px;font-size:13px;font-weight:600;color:var(--accent);text-decoration:underline}

/* shop / category archive */
/* shop / category archive */
.shop-banner{position:relative;border-radius:var(--r-lg);overflow:hidden;min-height:280px;display:flex;align-items:flex-end;background:#D8D2C6;margin-bottom:44px}
.shop-banner img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.shop-banner::after{content:"";position:absolute;inset:0;background:linear-gradient(8deg,rgba(20,26,22,.7) 0%,rgba(20,26,22,.15) 60%)}
.shop-banner .shop-banner-in{position:relative;z-index:2;padding:44px;color:#fff}
.shop-banner .shop-banner-in h1{color:#fff;font-size:38px;margin-bottom:8px}
.shop-banner .shop-banner-in p{color:rgba(255,255,255,.85);max-width:600px}

.shop-layout{display:grid;grid-template-columns:260px 1fr;gap:44px;align-items:start}
.shop-layout.no-filters{grid-template-columns:1fr}
.shop-main{min-width:0}

.shop-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;margin-bottom:18px}
.shop-toolbar-right{display:flex;align-items:center;gap:12px}
.shop-toolbar .results-count{color:var(--body);font-size:14px}
.woocommerce-result-count{margin:0}
.woocommerce-ordering select{border:1px solid #E7E2D8;border-radius:var(--r-pill);padding:10px 18px;font-family:inherit;font-size:14px;background:#fff}

.active-filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px}
.filter-pill{display:inline-flex;align-items:center;gap:8px;background:var(--sage);color:var(--accent-hover);font-size:13px;font-weight:600;padding:8px 14px;border-radius:var(--r-pill);text-decoration:none}
.filter-pill span{font-size:15px;line-height:1}
.filter-pill:hover{background:var(--accent);color:#fff}

/* filter sidebar / mobile drawer (shared markup — template-parts/shop/filters.php) */
.shop-filters{background:var(--sand);border-radius:var(--r-lg);padding:26px;position:sticky;top:110px}
.admin-bar .shop-filters{top:142px}
.shop-filters-head{display:none;align-items:center;justify-content:space-between;margin-bottom:18px}
.shop-filters-close{background:none;border:none;font-size:26px;line-height:1;cursor:pointer;color:var(--ink)}
.filter-group{border-bottom:1px solid #E7E2D8;padding-bottom:20px;margin-bottom:20px}
.filter-group:last-of-type{border-bottom:none;margin-bottom:0;padding-bottom:0}
.filter-group h4{font-size:13px;text-transform:uppercase;letter-spacing:1px;font-weight:700;margin-bottom:14px}
.filter-price-row{display:flex;align-items:center;gap:10px}
.filter-price-row input{width:0;flex:1;padding:10px 12px;border:1px solid #E7E2D8;border-radius:10px;font-family:inherit;font-size:14px;background:#fff}
.filter-check-list{list-style:none;display:flex;flex-direction:column;gap:10px;max-height:220px;overflow-y:auto}
.filter-check-list label{display:flex;align-items:center;gap:10px;font-size:14px;cursor:pointer}
.filter-check-list input[type=checkbox]{width:16px;height:16px;accent-color:var(--accent)}
.filter-actions{display:flex;flex-direction:column;gap:10px;margin-top:22px}
.filter-actions .btn{width:100%;justify-content:center;padding:13px}
.filter-clear{text-align:center;font-size:13px;color:var(--body);text-decoration:underline}
.shop-filters-toggle-btn{position:relative;padding:11px 22px;font-size:14px}
.filter-dot{position:absolute;top:6px;right:6px;width:8px;height:8px;border-radius:50%;background:var(--accent)}

@media(max-width:900px){
  .shop-layout{grid-template-columns:1fr}
  .shop-filters{position:fixed;top:0;right:0;bottom:0;width:min(340px,86vw);max-width:none;height:100vh;overflow-y:auto;border-radius:0;z-index:200;transform:translateX(100%);transition:transform .3s ease;box-shadow:-20px 0 50px rgba(0,0,0,.15)}
  .shop-filters.is-open{transform:translateX(0)}
  .shop-filters-head{display:flex}
}

/* related products / upsells (single-product page, but same grid component) */
.related.products,.upsells.upsell{margin-top:90px}
.related.products > h2,.upsells.upsell > h2{font-size:32px;margin-bottom:8px}
.related.products ul.products,.upsells.upsell ul.products{grid-template-columns:repeat(4,1fr)}

@media(max-width:1000px){
  .prod-grid{grid-template-columns:repeat(2,1fr)}
  .prod-grid.cols-4{grid-template-columns:repeat(2,1fr)}
  .woocommerce ul.products,.woocommerce-page ul.products{grid-template-columns:repeat(2,1fr)}
  .related.products ul.products,.upsells.upsell ul.products{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  .prod-grid{grid-template-columns:1fr}
  .prod-grid.cols-4{grid-template-columns:1fr}
  .woocommerce ul.products,.woocommerce-page ul.products{grid-template-columns:1fr}
  .related.products ul.products,.upsells.upsell ul.products{grid-template-columns:1fr}
}
