/* =========================================================
   Hello Child — Single product page (native layout)
   Loaded after product.css on single product pages (inc/product-page.php).
   Sections: page + hero · layout · gallery · buy card · actions · tabs · related · tablet · phone
   Swatches / quantity / total / popover / tabs skin stay in product.css.
   ========================================================= */

.pb-prod-page{
  --pb-primary:#2E3192;
  --pb-navy:#11145E;
  --pb-red:#EC1B23;
  --pb-green:#1DA851;
  --pb-muted:#5C6A82;
  --pb-line:#E4EAF4;
  --pb-soft:#F7FAFF;
  padding-bottom:56px;
  background:#F4F7FC;
  font-family:"Vazirmatn","vazir","Vazir",Sans-serif;
  color:var(--pb-navy);
}
.pb-prod-page *,.pb-prod-page *::before,.pb-prod-page *::after{box-sizing:border-box}
.pb-prod-page :where(h1,h2,h3,p,ul){margin:0;padding:0}
.pb-prod-page :where(ul){list-style:none}
.pb-prod-page img{max-width:100%;height:auto}
.pb-prod-page button,.pb-prod-page input,.pb-prod-page select,.pb-prod-page textarea{font-family:inherit}

/* ---------- hero (breadcrumb) ---------- */
.pb-prod-hero{height:76px;background:linear-gradient(120deg,#dfe9fb,#f4f7fc)}
.pb-prod-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--pb-muted)}
.pb-prod-crumbs a{color:var(--pb-primary);text-decoration:none}
.pb-prod-crumbs a:hover{text-decoration:underline}
.pb-prod-wrap{position:relative;z-index:1;width:calc(100% - 40px);max-width:1200px;margin:-30px auto 0}

/* ---------- layout ---------- */
.pb-prod{display:grid;grid-template-columns:minmax(0,11fr) minmax(0,9fr);gap:20px;align-items:start}
.pb-prod__media{display:flex;flex-direction:column;gap:16px;min-width:0}
.pb-prod__buy{min-width:0}
.pb-prod-tabs{grid-column:1 / -1}
.pb-prod-card{background:#fff;border:1px solid var(--pb-line);border-radius:16px;box-shadow:0 4px 16px rgba(17,20,94,.05)}

/* ---------- gallery ---------- */
.pb-prod-card.pb-gallery{position:relative;padding:16px;isolation:isolate}
.pb-prod-page .woocommerce-product-gallery,
.pb-prod-page div.images.woocommerce-product-gallery{margin:0 !important;width:100% !important;max-width:100% !important;float:none !important;opacity:1 !important}
.pb-prod-page .woocommerce-product-gallery .flex-viewport,
.pb-prod-page .woocommerce-product-gallery__wrapper{width:100%}
.pb-prod-page .woocommerce-product-gallery__image img{width:100%}
.pb-prod-page .woocommerce-product-gallery img{border-radius:12px}
.pb-gallery__stage{position:relative}
.pb-prod-card.pb-gallery .pb-prod-crumbs{margin-bottom:14px}
.pb-prod-tags{position:absolute;top:12px;inset-inline-start:12px;z-index:6;display:flex;flex-wrap:wrap;gap:6px;max-width:calc(100% - 70px);pointer-events:none}
.pb-prod-tags span{padding:3px 12px;border-radius:999px;background:var(--pb-red);font-size:12px;font-weight:700;line-height:1.8;color:#fff}
.pb-prod-features{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:12px;background:var(--pb-soft);border:1px solid var(--pb-line);border-radius:16px}
.pb-prod-features li{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;font-size:12.5px;font-weight:700;line-height:1.7}
.pb-prod-features__icon{display:grid;place-items:center;width:46px;height:46px;border:1.5px solid var(--pb-navy);border-radius:12px;background:#fff;color:var(--pb-navy)}

/* ---------- buy card ---------- */
.pb-prod-buy{display:flex;flex-direction:column;gap:16px;padding:24px}
.pb-prod-title{font-size:26px;font-weight:900;line-height:1.7}
.pb-prod-rating .star-rating{float:none;margin:0}
.pb-prod-cats{font-size:13px;font-weight:600;color:var(--pb-muted)}
.pb-prod-cats a{color:var(--pb-primary);text-decoration:none}
.pb-prod-short{font-size:14px;font-weight:500;line-height:2.1;color:#1F2A44}
.pb-prod-short p+p{margin-top:6px}
.pb-prod-price{display:flex;flex-direction:column;gap:4px;padding:16px;border:1px solid var(--pb-line);border-radius:12px;background:var(--pb-soft)}
.pb-prod-price__label{font-size:13.5px;font-weight:500;color:var(--pb-muted)}
.pb-prod-price .price{margin:0;font-size:20px;font-weight:900;color:var(--pb-navy)}
.pb-prod-price .price del{opacity:.5;font-size:15px}
.pb-prod-price .price ins{text-decoration:none}
.pb-prod-price__note{font-size:12.5px;font-weight:500;color:var(--pb-muted)}
.pb-prod-cart form.cart{margin:0}
.pb-prod-cart .stock{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--pb-green)}
.pb-prod-cart .stock.out-of-stock{color:var(--pb-red)}

/* ---------- actions: pre-invoice + WhatsApp ---------- */
.pb-prod-actions{display:flex;flex-direction:column;gap:10px}
.pb-prod-actions .pb-prod-btn{width:100%;padding:15px 12px;font-size:15px}
.pb-prod-wa-line{text-align:center;font-size:13px;font-weight:600;color:var(--pb-muted)}
.pb-prod-wa-link{font-weight:800;color:#158A40;text-decoration:underline;text-underline-offset:4px}
.pb-prod-wa-link:hover{color:var(--pb-navy)}
.pb-prod-price__link{align-self:flex-start;margin-top:4px;padding:0;border:0;background:none;font-family:inherit;font-size:13px;font-weight:800;color:var(--pb-primary);text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.pb-prod-price__link:hover{color:var(--pb-navy)}
.pb-prod-btn{display:flex;align-items:center;justify-content:center;gap:8px;padding:14px 12px;border-radius:12px;border:1px solid transparent;font-family:inherit;font-size:14px;font-weight:900;line-height:1.6;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .2s ease,color .2s ease,border-color .2s ease}
.pb-prod-btn--outline{background:#fff;border-color:var(--pb-navy);color:var(--pb-navy)}
.pb-prod-btn--outline:hover{background:var(--pb-navy);color:#fff}
.pb-prod-btn--wa{background:var(--pb-green);color:#fff}
.pb-prod-btn--wa:hover{background:#158a40;color:#fff}

/* ---------- tabs card ---------- */
.pb-prod-tabs{padding:16px;isolation:isolate}
.pb-prod-tabs .woocommerce-tabs{margin:0;padding:0}
.pb-prod-tabs .hc-tab-title,.pb-prod-tabs h2{font-size:17px;font-weight:900;line-height:1.8}
.pb-prod-tabs table.shop_attributes{width:100%;border-collapse:collapse}
.pb-prod-tabs table.shop_attributes th,.pb-prod-tabs table.shop_attributes td{padding:12px 14px;border:0;border-top:1px solid var(--pb-line);font-size:14px;line-height:1.9;text-align:right}
.pb-prod-tabs table.shop_attributes th{width:34%;font-weight:700;color:var(--pb-muted);background:var(--pb-soft)}
.pb-prod-tabs table.shop_attributes td p{margin:0}
.pb-prod-tabs .woocommerce-Tabs-panel{font-size:14px;line-height:2.1}

/* ---------- tablet ---------- */
@media(max-width:1024px){
  .pb-prod{grid-template-columns:minmax(0,1fr)}
}

/* ---------- phone ---------- */
@media(max-width:767px){
  .pb-prod-hero{height:68px}
  .pb-prod-buy{padding:16px}
  .pb-prod-title{font-size:21px}
  .pb-prod-card.pb-gallery,.pb-prod-tabs{padding:12px}
  .pb-prod-tags{top:8px;inset-inline-start:8px}
  .pb-prod-features{gap:6px;padding:10px 6px}
  .pb-prod-features li{font-size:11px}
  .pb-prod-features__icon{width:38px;height:38px}
  .pb-prod-actions{gap:8px}
  .pb-prod-btn{padding:12px 6px;font-size:12px}
}
@media(prefers-reduced-motion:reduce){
  .pb-prod-btn{transition:none}
}
