/* Liyomera — WooCommerce overrides (loaded only when Woo is active) */

.woocommerce-products-header{ background:var(--surface); padding:40px 0; margin-bottom:0; text-align:center; }
.woocommerce-products-header__title{ font-size:clamp(24px,3vw,36px); }
.term-description{ color:var(--muted); max-width:640px; margin:10px auto 0; }

.shop-wrap{ padding-top:40px; padding-bottom:60px; }

/* layout: sidebar + grid.
   Two columns ONLY when a real sidebar is present; otherwise the products
   main must span the full width (a single-child 260px track squeezes the grid). */
.woocommerce.archive .shop-wrap, .woocommerce.post-type-archive .shop-wrap{ display:block; }
.woocommerce.archive .shop-wrap:has(.shop-sidebar),
.woocommerce.post-type-archive .shop-wrap:has(.shop-sidebar){ display:grid; grid-template-columns:260px 1fr; gap:36px; align-items:start; }
.woocommerce .site-main{ min-width:0; max-width:100%; }
@media (max-width:900px){
  .woocommerce.archive .shop-wrap:has(.shop-sidebar),
  .woocommerce.post-type-archive .shop-wrap:has(.shop-sidebar){ grid-template-columns:1fr; }
}

/* result count + ordering bar */
.woocommerce .woocommerce-result-count{ color:var(--muted); font-size:14px; }
.woocommerce .woocommerce-ordering select{ border:1.5px solid var(--line-2); border-radius:var(--r-sm); padding:10px 14px; font-family:inherit; background:#fff; max-width:100%; }
/* long price numbers (Rial, in the millions) must wrap, never widen the cell */
.woocommerce ul.products li.product .price{ overflow-wrap:anywhere; word-break:break-word; }

/* product grid */
.woocommerce ul.products{ display:grid !important; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin:0; }
.woocommerce ul.products::before, .woocommerce ul.products::after{ content:none !important; }
.woocommerce ul.products li.product{ width:auto !important; margin:0 !important; float:none !important; background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; padding:0; transition:transform .2s,box-shadow .25s,border-color .2s; }
.woocommerce ul.products li.product:hover{ transform:translateY(-6px); box-shadow:var(--shadow); border-color:var(--o-100); }
.woocommerce ul.products li.product a img{ margin:12px; width:calc(100% - 24px); border-radius:var(--arch); background:var(--o-50); }
.woocommerce ul.products li.product .woocommerce-loop-product__title{ font-size:15px; font-weight:700; color:var(--ink); padding:0 16px; line-height:1.6; min-height:46px; }
.woocommerce ul.products li.product .price{ display:block; padding:6px 16px 0; color:var(--ink); font-weight:600; }
.woocommerce ul.products li.product .price ins{ text-decoration:none; }
.woocommerce ul.products li.product .price .amount{ color:var(--o-700); font-weight:800; font-size:17px; }
.woocommerce ul.products li.product del .amount{ color:var(--muted); font-weight:500; font-size:13px; }
.woocommerce ul.products li.product .star-rating{ margin:6px 16px; color:#F5A623; font-size:13px; }
.woocommerce ul.products li.product .button, .woocommerce ul.products li.product .added_to_cart{ margin:10px 16px 16px; display:inline-flex; align-items:center; justify-content:center; gap:8px; background:var(--o-50); color:var(--o-700); border-radius:12px; padding:11px 16px; font-weight:700; font-size:14px; transition:.18s; }
.woocommerce ul.products li.product .button:hover, .woocommerce ul.products li.product .added_to_cart:hover{ background:var(--o); color:#fff; }
.woocommerce ul.products li.product .onsale{ position:absolute; top:18px; inset-inline-start:18px; z-index:2; }

@media (max-width:980px){ .woocommerce ul.products{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; } }
@media (max-width:520px){
  .woocommerce-products-header{ padding:28px 0; }
  .woocommerce .woocommerce-ordering{ float:none; margin:8px 0 16px; }
  .woocommerce .woocommerce-ordering select{ width:100%; }
  .woocommerce ul.products{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:12px; }
  .woocommerce ul.products li.product a img{ margin:8px; width:calc(100% - 16px); }
  .woocommerce ul.products li.product .woocommerce-loop-product__title{ font-size:13.5px; padding:0 12px; min-height:40px; }
  .woocommerce ul.products li.product .price, .woocommerce ul.products li.product .star-rating{ padding-inline:12px; margin-inline:12px; }
  .woocommerce ul.products li.product .price .amount{ font-size:15px; }
  .woocommerce ul.products li.product .button, .woocommerce ul.products li.product .added_to_cart{ margin:8px 12px 12px; padding:10px 12px; font-size:13px; }
}

/* sale badge */
.woocommerce span.onsale{ background:var(--sale); color:#fff; border-radius:8px; font-size:12px; font-weight:800; padding:4px 9px; min-height:0; min-width:0; line-height:1.4; }

/* ============ SINGLE PRODUCT ============ */
.single-product div.product{ display:grid; grid-template-columns:1fr 1fr; gap:48px; padding:46px 0; }
.single-product div.product .woocommerce-product-gallery{ width:100% !important; margin:0; }
.single-product div.product .woocommerce-product-gallery__wrapper img{ border-radius:var(--r-lg); }
.single-product div.product .product_title{ font-size:clamp(24px,3vw,34px); }
.single-product div.product p.price, .single-product div.product span.price{ color:var(--o-700); font-weight:800; font-size:26px; margin:14px 0; }
.single-product div.product p.price del{ color:var(--muted); font-weight:500; font-size:18px; }
.single-product .woocommerce-product-rating{ margin-bottom:14px; }
.single-product .woocommerce-product-details__short-description{ color:var(--body); line-height:1.95; }
.single-product form.cart{ margin:24px 0; display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.single-product form.cart .quantity input{ width:72px; height:52px; border:1.5px solid var(--line-2); border-radius:var(--r-sm); text-align:center; font-family:inherit; font-size:16px; }
.single-product .single_add_to_cart_button{ background:var(--o) !important; color:#fff !important; border-radius:var(--r-sm) !important; padding:16px 34px !important; font-weight:700 !important; font-size:16px !important; box-shadow:0 8px 20px rgba(245,138,75,.32); transition:.18s; }
.single-product .single_add_to_cart_button:hover{ background:var(--o-600) !important; transform:translateY(-2px); }
.single-product .variations select{ border:1.5px solid var(--line-2); border-radius:var(--r-sm); padding:12px 14px; font-family:inherit; background:#fff; min-width:160px; }
.single-product .product_meta{ font-size:13px; color:var(--muted); margin-top:18px; }

/* tabs */
.woocommerce-tabs{ grid-column:1/-1; margin-top:20px; }
.woocommerce-tabs ul.tabs{ display:flex; gap:8px; border-bottom:2px solid var(--line); padding:0; margin-bottom:24px; }
.woocommerce-tabs ul.tabs li{ list-style:none; }
.woocommerce-tabs ul.tabs li a{ display:block; padding:12px 20px; font-weight:700; color:var(--body); border-bottom:2px solid transparent; margin-bottom:-2px; }
.woocommerce-tabs ul.tabs li.active a{ color:var(--o-700); border-bottom-color:var(--o); }
.woocommerce-tabs .panel{ color:var(--body); line-height:2; }

.related.products, .upsells.products{ grid-column:1/-1; }
.related.products > h2, .upsells.products > h2{ font-size:24px; margin-bottom:24px; }

@media (max-width:860px){ .single-product div.product{ grid-template-columns:1fr; gap:28px; } }

/* ============ CART & CHECKOUT ============ */
.woocommerce-cart .shop-wrap, .woocommerce-checkout .shop-wrap, .woocommerce-account .shop-wrap{ padding-top:46px; }
.woocommerce table.shop_table{ border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; border-collapse:separate; }
.woocommerce table.shop_table th{ background:var(--surface); color:var(--ink); font-weight:700; padding:16px; }
.woocommerce table.shop_table td{ padding:16px; border-top:1px solid var(--line); }
.woocommerce .cart-collaterals .cart_totals, .woocommerce-checkout #order_review{ background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg); padding:8px 24px 24px; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit{ background:var(--o); color:#fff; border-radius:var(--r-sm); padding:13px 24px; font-weight:700; font-family:inherit; transition:.18s; }
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover{ background:var(--o-600); }
.woocommerce .button.alt, .woocommerce #place_order{ background:var(--o); }
.woocommerce-checkout #payment{ background:var(--surface); border-radius:var(--r-lg); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select{ border:1.5px solid var(--line-2); border-radius:var(--r-sm); padding:12px 14px; font-family:inherit; background:#fff; }
.woocommerce-info, .woocommerce-message{ border-top-color:var(--o); }
.woocommerce-info::before, .woocommerce-message::before{ color:var(--o); }

/* account */
.woocommerce-MyAccount-navigation ul{ display:flex; flex-direction:column; gap:4px; }
.woocommerce-MyAccount-navigation a{ display:block; padding:12px 16px; border-radius:var(--r-sm); font-weight:600; color:var(--body); }
.woocommerce-MyAccount-navigation .is-active a{ background:var(--o-50); color:var(--o-700); }

/* messages / notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error{ border-radius:var(--r); }
