/*
Theme Name: Haji Beigi Construction Shop Pro
Description: قالب حرفه‌ای فروشگاه مصالح ساختمانی حاجی‌بیگی، RTL و WooCommerce
Version: 2.0.0
*/
:root{--y:#ffd400;--y2:#ffea68;--black:#151515;--bg:#f5f5f5;--white:#fff;--text:#252525;--muted:#777;--line:#e7e7e7;--r:14px;--shadow:0 3px 16px rgba(0,0,0,.07)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:Tahoma,Arial,sans-serif;line-height:1.8}a{text-decoration:none;color:inherit}.container{width:min(1220px,94%);margin:auto}.hb-top{background:var(--black);color:#fff;font-size:12px}.hb-top .container{display:flex;justify-content:space-between;padding:7px 0}.hb-header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:50}.hb-header-inner{display:grid;grid-template-columns:auto 1fr auto;gap:22px;align-items:center;padding:14px 0}.logo{font-size:23px;font-weight:900;white-space:nowrap}.logo span{background:var(--y);padding:2px 8px;border-radius:7px}.hb-search{display:flex;background:#f1f1f1;border-radius:11px;overflow:hidden}.hb-search input{width:100%;border:0;outline:0;background:transparent;padding:12px 15px;font-size:14px}.hb-search button{border:0;background:var(--y);padding:0 22px;font-weight:900;cursor:pointer}.hb-actions{display:flex;gap:8px}.hb-action{border:1px solid var(--line);padding:7px 11px;border-radius:10px;background:#fff;font-weight:700;font-size:13px}.hb-nav{background:#fff;border-bottom:1px solid var(--line)}.hb-nav .container{display:flex;align-items:center;gap:24px;overflow:auto;white-space:nowrap}.hb-nav a{font-size:13px;font-weight:700;padding:9px 0}.hb-nav .catlink{font-weight:900}.hero{padding:22px 0}.hero-grid{display:grid;grid-template-columns:1.55fr .65fr;gap:14px}.hero-main{min-height:350px;border-radius:20px;background:linear-gradient(125deg,#171717 0%,#282828 65%,#3b3b3b);color:#fff;padding:42px;position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:center}.hero-main:after{content:'🧱';position:absolute;left:35px;bottom:-65px;font-size:220px;opacity:.08}.hero-main h1{font-size:40px;line-height:1.4;margin:0 0 10px;max-width:680px;position:relative;z-index:1}.hero-main h1 strong{color:var(--y)}.hero-main p{max-width:650px;color:#ddd;position:relative;z-index:1}.hero-cta{display:flex;gap:10px;flex-wrap:wrap;position:relative;z-index:1}.hb-btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 18px;border-radius:10px;background:var(--y);color:#111;font-weight:900;border:0}.hb-btn.dark{background:#fff}.hero-side{background:var(--y);border-radius:20px;padding:28px;display:flex;flex-direction:column;justify-content:center}.hero-side h3{font-size:24px;margin:0 0 6px}.hero-side ul{padding-right:20px}.section{padding:18px 0 38px}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.section-head h2{margin:0;font-size:22px}.section-head a{font-size:13px;font-weight:800}.categories{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.cat{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:18px;text-align:center;font-weight:900;transition:.2s}.cat:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.cat .ico{display:block;font-size:42px}.cat small{display:block;color:var(--muted);font-weight:400;margin-top:3px}.products-grid,.woocommerce ul.products{display:grid!important;grid-template-columns:repeat(4,1fr);gap:14px;margin:0!important;padding:0!important}.woocommerce ul.products:before,.woocommerce ul.products:after{display:none}.woocommerce ul.products li.product{float:none!important;width:auto!important;margin:0!important;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:13px!important;box-shadow:none;transition:.2s}.woocommerce ul.products li.product:hover{box-shadow:var(--shadow);transform:translateY(-2px)}.woocommerce ul.products li.product img{border-radius:10px;aspect-ratio:1/1;object-fit:cover}.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:14px;min-height:50px}.woocommerce ul.products li.product .price{font-weight:900;color:#222;font-size:16px}.woocommerce ul.products li.product .button{width:100%;background:var(--black);color:#fff;border-radius:9px;margin-top:6px}.benefits{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.benefit{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:17px}.benefit b{display:block}.benefit span{font-size:12px;color:var(--muted)}.promo{background:linear-gradient(90deg,var(--y),var(--y2));border-radius:18px;padding:26px;display:flex;align-items:center;justify-content:space-between;gap:20px}.promo h2{margin:0}.hb-footer{background:var(--black);color:#eee;padding:42px 0 18px;margin-top:25px}.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:25px}.footer-grid h3{color:#fff;margin-top:0}.footer-grid p{color:#bbb;font-size:13px}.footer-bottom{border-top:1px solid #333;margin-top:25px;padding-top:14px;color:#aaa;font-size:12px}.woocommerce .site-main,.woocommerce-page .site-main{padding:30px 0}.woocommerce form .form-row input.input-text,.woocommerce form .form-row textarea,.woocommerce form .form-row select,.select2-container .select2-selection--single{border:1px solid #ddd;border-radius:9px;padding:10px;min-height:44px}.woocommerce-message,.woocommerce-info,.woocommerce-error{border-radius:10px}.mobile-menu{display:none}
@media(max-width:900px){.hb-header-inner{grid-template-columns:auto auto}.hb-search{grid-column:1/-1;grid-row:2}.hb-actions{justify-content:flex-end}.hb-nav .container{gap:18px}.hero-grid{grid-template-columns:1fr}.categories,.benefits{grid-template-columns:repeat(2,1fr)}.products-grid,.woocommerce ul.products{grid-template-columns:repeat(2,1fr)!important}.footer-grid{grid-template-columns:1fr 1fr}.hero-main h1{font-size:32px}}
@media(max-width:520px){.container{width:94%}.hb-top .container{font-size:10px}.hb-top .container span:last-child{display:none}.hb-header-inner{gap:10px}.logo{font-size:18px}.hb-action{font-size:11px;padding:6px 8px}.hb-search button{padding:0 13px}.hero-main{padding:27px;min-height:300px}.hero-main h1{font-size:27px}.hero-side{padding:22px}.categories,.benefits,.products-grid,.woocommerce ul.products{grid-template-columns:1fr 1fr!important;gap:8px}.cat{padding:12px 6px}.cat .ico{font-size:32px}.woocommerce ul.products li.product{padding:9px!important}.woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:12px}.woocommerce ul.products li.product .price{font-size:14px}.hb-btn{padding:9px 13px;font-size:12px}.footer-grid{grid-template-columns:1fr}.promo{display:block}}


/* Hajibeigi Pro 2.1 compatibility + responsive fixes */
html { direction: rtl; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; height: auto; }
.hb-results { display:grid; gap:20px; }
.hb-result { padding:20px; background:#fff; border:1px solid #eee; border-radius:14px; }
.hb-woocommerce { min-height: 50vh; }
.woocommerce .products ul, .woocommerce ul.products { margin-right:0; }
@media (max-width: 768px) {
  .container { width: min(94%, 1100px); }
  .hb-header-main { gap:10px; flex-wrap:wrap; }
  .hb-search-wrap { order: 3; width:100%; }
  .hb-actions em { display:none; }
  .hb-nav-row { overflow-x:auto; }
  .nav-note { display:none; }
}


/* ===== Hajibeigi Pro 2.2 clean storefront ===== */
:root { --hb-border:#e7e7e7; --hb-text:#222; --hb-muted:#777; --hb-accent:#f5b400; }
body { direction:rtl; color:var(--hb-text); background:#f7f7f7; }
.hb-header-clean { background:#fff; border-bottom:1px solid var(--hb-border); }
.hb-header-clean .hb-header-main { min-height:78px; display:flex; align-items:center; gap:24px; }
.hb-store-title { font-size:22px; font-weight:800; color:#111; text-decoration:none; white-space:nowrap; }
.hb-search-wrap { flex:1; }
.hb-search { display:flex; max-width:720px; margin:auto; background:#f3f3f3; border-radius:10px; overflow:hidden; border:1px solid #e1e1e1; }
.hb-search input { flex:1; border:0; background:transparent; padding:13px 16px; outline:0; min-width:0; }
.hb-search button { width:52px; border:0; background:var(--hb-accent); cursor:pointer; font-size:24px; }
.hb-actions { display:flex; align-items:center; gap:12px; }
.hb-actions a { color:#222; text-decoration:none; padding:9px 12px; border:1px solid var(--hb-border); border-radius:9px; background:#fff; white-space:nowrap; }
.hb-cart { position:relative; }
.hb-cart-count { display:inline-flex; min-width:20px; height:20px; align-items:center; justify-content:center; border-radius:10px; margin-right:5px; background:var(--hb-accent); font-size:12px; font-weight:700; }
.hb-categories-section, .hb-products-section { padding:32px 0; }
.hb-section-head { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:18px; }
.hb-section-head h2 { margin:0; font-size:22px; }
.hb-section-head a { color:#555; text-decoration:none; }
.hb-category-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.hb-category-card { background:#fff; border:1px solid var(--hb-border); border-radius:12px; padding:20px; text-decoration:none; color:#222; transition:.15s; }
.hb-category-card:hover { transform:translateY(-2px); box-shadow:0 5px 18px rgba(0,0,0,.06); }
.hb-category-name { display:block; font-weight:800; margin-bottom:8px; }
.hb-category-count { color:var(--hb-muted); font-size:13px; }
.hb-product-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.hb-product-card { background:#fff; border:1px solid var(--hb-border); border-radius:12px; overflow:hidden; }
.hb-product-image { display:flex; align-items:center; justify-content:center; min-height:210px; background:#fff; }
.hb-product-image img { max-height:210px; object-fit:contain; }
.hb-product-body { padding:15px; }
.hb-product-body h3 { font-size:15px; line-height:1.7; margin:0 0 10px; }
.hb-product-body h3 a { color:#222; text-decoration:none; }
.hb-product-price { font-weight:800; margin-bottom:12px; }
.hb-add-cart { display:block; text-align:center; padding:9px; border-radius:8px; background:var(--hb-accent); color:#111; text-decoration:none; font-weight:700; }
.hb-empty { background:#fff; border:1px dashed #ccc; border-radius:12px; padding:30px; text-align:center; color:#777; grid-column:1/-1; }
.hb-footer { background:#fff; border-top:1px solid var(--hb-border); padding:30px 0 15px; }
.hb-footer .footer-grid { display:grid; grid-template-columns:2fr 1fr; gap:30px; }
.hb-footer a { display:block; color:#444; text-decoration:none; margin:5px 0; }
.hb-footer .footer-bottom { border-top:1px solid var(--hb-border); margin-top:25px; padding-top:15px; color:#777; font-size:13px; }
@media(max-width:900px){
  .hb-header-clean .hb-header-main { flex-wrap:wrap; padding-top:12px; padding-bottom:12px; }
  .hb-store-title { width:100%; text-align:center; }
  .hb-search-wrap { order:3; width:100%; flex-basis:100%; }
  .hb-category-grid, .hb-product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:520px){
  .hb-actions { width:100%; justify-content:center; }
  .hb-actions a { flex:1; text-align:center; }
  .hb-category-grid, .hb-product-grid { grid-template-columns:1fr; }
}
