/*
Theme Name: Afshar Yadak
Theme URI: https://afsharyadak.com
Author: Afshar Yadak
Description: قالب اختصاصی فروشگاه لوازم یدکی افشار یدک، سازگار با WooCommerce و RTL.
Version: 0.7.4
Text Domain: afsharyadak
Requires at least: 6.0
Requires PHP: 8.0
*/

:root{
  --ay-bg:#f5f7f9;
  --ay-card:#ffffff;
  --ay-dark:#11161c;
  --ay-dark-2:#1a2028;
  --ay-red:#e51d2a;
  --ay-red-2:#ff2a38;
  --ay-text:#12171d;
  --ay-muted:#6d7680;
  --ay-line:#e4e8ec;
  --ay-green:#159947;
  --ay-radius:16px;
  --ay-shadow:0 10px 30px rgba(16,24,32,.08);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--ay-bg);color:var(--ay-text);font-family:Tahoma,"Vazirmatn","IRANSansX",Arial,sans-serif;direction:rtl}
a{text-decoration:none;color:inherit}
img{max-width:100%;height:auto}
button,input,select{font:inherit}
.container{width:min(1440px,calc(100% - 32px));margin-inline:auto}

.site-header{background:var(--ay-dark);color:#fff;position:sticky;top:0;z-index:999;box-shadow:0 8px 24px rgba(0,0,0,.16)}
.topbar{background:#0b0f14;border-bottom:1px solid rgba(255,255,255,.06);font-size:13px;color:#c9d0d7}
.topbar .container{display:flex;justify-content:space-between;align-items:center;min-height:36px;gap:16px}
.header-main{display:grid;grid-template-columns:260px minmax(320px,1fr) 280px;gap:22px;align-items:center;padding:14px 0}
.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:24px;white-space:nowrap}
.brand-mark{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,var(--ay-red),#94000b);box-shadow:inset 0 0 0 6px rgba(255,255,255,.08)}
.brand-logo{display:block;flex:0 0 44px;width:44px;height:44px;object-fit:contain;filter:drop-shadow(0 3px 7px rgba(17,28,38,.15))}
.brand small{display:block;font-size:10px;letter-spacing:3px;color:#aeb7c0;margin-top:2px}
.header-search{position:relative}
.header-search input{width:100%;height:48px;border:0;border-radius:12px;padding:0 18px 0 58px;background:#fff;color:#111;outline:none}
.header-search button{position:absolute;left:5px;top:5px;width:40px;height:38px;border:0;border-radius:9px;background:var(--ay-red);color:#fff;cursor:pointer;font-size:18px}
.header-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px}
.header-pill{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);padding:10px 13px;border-radius:10px;color:#fff;font-size:13px}
.navbar{border-top:1px solid rgba(255,255,255,.07);background:#141a21}
.navbar .container{display:flex;align-items:center;gap:26px;min-height:46px;font-size:14px}
.navbar a:hover,.navbar .hot{color:#ff4b55}

.hero{background:linear-gradient(110deg,rgba(10,14,20,.96),rgba(14,19,25,.90)),radial-gradient(circle at 20% 50%,#433 0,transparent 40%);color:#fff;padding:58px 0 52px;overflow:hidden}
.hero-grid{display:grid;grid-template-columns:1.08fr .92fr;gap:36px;align-items:center}
.hero h1{font-size:52px;line-height:1.35;margin:0 0 14px}.hero h1 span{color:var(--ay-red-2)}
.hero p{color:#cbd2d9;font-size:17px;line-height:2;margin-bottom:28px}
.hero-visual{min-height:330px;border-radius:24px;background:linear-gradient(135deg,#202830,#0e1115);position:relative;box-shadow:inset 0 0 0 1px rgba(255,255,255,.07)}
.hero-visual:before,.hero-visual:after{content:"";position:absolute;border-radius:50%;filter:blur(1px)}
.hero-visual:before{width:230px;height:230px;background:radial-gradient(circle,var(--ay-red) 0,rgba(229,29,42,.05) 60%,transparent 70%);right:12%;top:12%}
.hero-visual:after{width:170px;height:170px;border:22px solid #343c45;left:18%;bottom:18%;box-shadow:0 0 0 14px #101419,0 0 0 16px #676f78}
.hero-visual .part-disc{position:absolute;width:160px;height:160px;border-radius:50%;border:18px solid #a5adb5;left:19%;bottom:20%;box-shadow:inset 0 0 0 16px #343b43}
.hero-visual .part-caliper{position:absolute;width:70px;height:130px;background:linear-gradient(#ff3040,#b4000c);left:15%;bottom:22%;border-radius:28px 20px 20px 28px;transform:rotate(8deg);box-shadow:0 10px 30px rgba(229,29,42,.35)}
.vehicle-finder{background:#fff;border-radius:18px;padding:18px;box-shadow:var(--ay-shadow);display:grid;grid-template-columns:repeat(4,1fr) 180px;gap:10px}
.vehicle-finder select,.vehicle-finder button{height:50px;border-radius:10px;border:1px solid var(--ay-line);padding:0 12px;background:#fff}
.vehicle-finder button{background:var(--ay-red);color:#fff;border-color:var(--ay-red);font-weight:700;cursor:pointer}

.trust-strip{margin-top:-22px;position:relative;z-index:2}.trust-strip .inner{background:#fff;border-radius:16px;box-shadow:var(--ay-shadow);display:grid;grid-template-columns:repeat(4,1fr);padding:18px}
.trust-item{display:flex;gap:12px;align-items:center;padding:6px 18px;border-left:1px solid var(--ay-line)}.trust-item:last-child{border-left:0}.trust-icon{width:42px;height:42px;border-radius:12px;background:#fff0f1;color:var(--ay-red);display:grid;place-items:center;font-size:20px}.trust-item b{display:block;margin-bottom:4px}.trust-item span{font-size:12px;color:var(--ay-muted)}

.section{padding:54px 0}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.section-head h2{margin:0;font-size:28px}.section-head a{color:var(--ay-red);font-size:14px;font-weight:700}
.category-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:12px}.category-card{background:#fff;border:1px solid var(--ay-line);border-radius:14px;padding:18px 10px;text-align:center;transition:.2s}.category-card:hover{transform:translateY(-3px);box-shadow:var(--ay-shadow);border-color:#f2b5ba}.category-icon{font-size:30px;margin-bottom:10px}.category-card span{font-size:13px;font-weight:700}

.car-grid{display:grid;grid-template-columns:repeat(9,1fr);gap:10px}.car-card{background:#fff;border:1px solid var(--ay-line);border-radius:14px;text-align:center;padding:12px}.car-thumb{height:60px;border-radius:10px;background:linear-gradient(180deg,#eef2f5,#dfe5ea);display:grid;place-items:center;color:#6c7680;font-size:11px;margin-bottom:8px}

.products-layout{display:grid;grid-template-columns:320px 1fr;gap:18px;align-items:start}.shop-sidebar{background:#fff;border:1px solid var(--ay-line);border-radius:16px;padding:20px;position:sticky;top:152px}.filter-group{padding:16px 0;border-bottom:1px solid var(--ay-line)}.filter-group:last-child{border-bottom:0}.filter-group h4{margin:0 0 12px}.filter-group label{display:flex;align-items:center;gap:8px;margin:8px 0;color:#4c5660;font-size:13px}.filter-group select,.filter-group input[type="text"]{width:100%;height:42px;border:1px solid var(--ay-line);border-radius:9px;padding:0 10px;background:#fff}
.shop-toolbar{background:#fff;border:1px solid var(--ay-line);border-radius:14px;padding:12px 16px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;color:#66707a;font-size:13px}.shop-toolbar select{height:38px;border:1px solid var(--ay-line);border-radius:9px;padding:0 10px;background:#fff}
.product-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.product-card{background:#fff;border:1px solid var(--ay-line);border-radius:15px;overflow:hidden;position:relative;transition:.2s}.product-card:hover{transform:translateY(-3px);box-shadow:var(--ay-shadow)}.product-badge{position:absolute;top:10px;right:10px;z-index:2;background:var(--ay-red);color:#fff;border-radius:7px;padding:5px 8px;font-size:11px;font-weight:700}.product-image{height:205px;display:grid;place-items:center;background:linear-gradient(180deg,#fff,#f6f7f8);padding:20px}.product-image img{max-height:165px;object-fit:contain}.product-body{padding:14px}.product-title{font-size:14px;line-height:1.8;font-weight:800;min-height:50px;margin:0 0 6px}.product-brand{font-size:11px;color:#8a949e}.fitment-ok{margin:9px 0;background:#eaf8ef;color:var(--ay-green);border-radius:8px;padding:7px 8px;font-size:11px}.price{font-weight:900;color:var(--ay-red);font-size:16px}.stock{color:var(--ay-green);font-size:11px;margin-top:7px}.add-to-cart{display:block;width:100%;border:0;border-radius:9px;background:var(--ay-red);color:#fff;text-align:center;padding:11px 8px;margin-top:10px;font-weight:800;cursor:pointer}

.pagination{display:flex;justify-content:center;gap:6px;margin-top:22px}.pagination a,.pagination span{width:38px;height:38px;border-radius:9px;background:#fff;border:1px solid var(--ay-line);display:grid;place-items:center}.pagination .current{background:var(--ay-red);color:#fff;border-color:var(--ay-red)}

.site-footer{background:var(--ay-dark);color:#d3d9df;margin-top:50px}.footer-top{padding:40px 0;display:grid;grid-template-columns:1.4fr repeat(3,1fr);gap:30px}.footer-top h4{color:#fff;margin:0 0 14px}.footer-top a{display:block;color:#aeb7c0;margin:9px 0;font-size:13px}.footer-bottom{border-top:1px solid rgba(255,255,255,.08);padding:14px 0;color:#87919b;font-size:12px}

.woocommerce .woocommerce-breadcrumb{margin:0 0 18px;color:#7b858f;font-size:13px}.woocommerce .woocommerce-result-count{float:none;margin:0}.woocommerce .woocommerce-ordering{float:none;margin:0}.woocommerce ul.products{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0}.woocommerce ul.products:before,.woocommerce ul.products:after{display:none}.woocommerce ul.products li.product{width:auto!important;margin:0!important;background:#fff;border:1px solid var(--ay-line);border-radius:15px;padding:0 0 14px;overflow:hidden}.woocommerce ul.products li.product a img{margin:0;height:210px;object-fit:contain;padding:18px;background:#fafafa}.woocommerce ul.products li.product .woocommerce-loop-product__title{padding:12px 14px 4px;font-size:14px;line-height:1.8}.woocommerce ul.products li.product .price{padding:0 14px;color:var(--ay-red)!important}.woocommerce ul.products li.product .button{margin:10px 14px 0;background:var(--ay-red);color:#fff;border-radius:9px;text-align:center;display:block;padding:11px}.woocommerce span.onsale{background:var(--ay-red);right:10px;left:auto;top:10px;min-height:auto;line-height:1;padding:7px 9px;border-radius:7px}

@media(max-width:1200px){.category-grid{grid-template-columns:repeat(4,1fr)}.car-grid{grid-template-columns:repeat(5,1fr)}.product-grid,.woocommerce ul.products{grid-template-columns:repeat(3,1fr)}.header-main{grid-template-columns:210px 1fr 220px}.vehicle-finder{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.header-main{grid-template-columns:1fr}.header-actions{display:none}.navbar{display:none}.hero-grid{grid-template-columns:1fr}.hero h1{font-size:38px}.hero-visual{display:none}.products-layout{grid-template-columns:1fr}.shop-sidebar{position:static}.trust-strip .inner{grid-template-columns:repeat(2,1fr)}.product-grid,.woocommerce ul.products{grid-template-columns:repeat(2,1fr)}.footer-top{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.container{width:min(100% - 18px,1440px)}.topbar{display:none}.hero{padding:34px 0}.hero h1{font-size:31px}.hero p{font-size:14px}.vehicle-finder{grid-template-columns:1fr}.trust-strip{margin-top:14px}.trust-strip .inner{grid-template-columns:1fr}.trust-item{border-left:0;border-bottom:1px solid var(--ay-line)}.category-grid{grid-template-columns:repeat(2,1fr)}.car-grid{grid-template-columns:repeat(3,1fr)}.product-grid,.woocommerce ul.products{grid-template-columns:1fr}.footer-top{grid-template-columns:1fr}.section{padding:36px 0}.section-head h2{font-size:22px}.brand{font-size:21px}}
