/**
 * gridfinity.ir storefront skin — RTL, Vazirmatn, Gridfinity brand identity.
 * Signature: the "extrusion line" — a filament-gold rule that underlines headings and
 * frames the price, echoing a single deposited filament path. One bold accent; the rest quiet.
 * Layered on top of the default block theme + WooCommerce; scoped to avoid Elementor pages.
 */
:root{
  --gf-anthracite:#16191A; --gf-ink:#1A1F1D; --gf-muted:#5C6360;
  --gf-melamine:#F4F5F3; --gf-surface:#FFFFFF; --gf-sunk:#ECEEEB;
  --gf-hair:#DDE0DC; --gf-hair-2:#C9CDC8;
  --gf-filament:#B79A5E; --gf-filament-ink:#9C7F3F; --gf-green:#5E8F3C;
  --gf-radius:12px;
}

/* ---- global type + RTL rhythm ---------------------------------------- */
body.gf-store{ font-family:"Vazirmatn",Tahoma,sans-serif; color:var(--gf-ink); background:var(--gf-melamine); line-height:1.7; }
body.gf-store .wp-block-group,body.gf-store main{ direction:rtl; }
body.gf-store a{ color:var(--gf-filament-ink); }
body.gf-store .tnum,body.gf-store .price,body.gf-store bdi{ font-variant-numeric:tabular-nums; }

/* ---- WooCommerce shop / archive -------------------------------------- */
.woocommerce .woocommerce-result-count,.woocommerce-page .woocommerce-result-count{ color:var(--gf-muted); font-size:.85rem; }
.woocommerce .woocommerce-ordering select{ font:inherit; padding:8px 12px; border:1px solid var(--gf-hair-2); border-radius:100px; background:var(--gf-surface); color:var(--gf-ink); min-height:40px; }

.woocommerce ul.products,.woocommerce-page ul.products{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:20px; margin:0; }
.woocommerce ul.products li.product,.woocommerce-page ul.products li.product{ width:auto; margin:0; float:none; background:var(--gf-surface); border:1px solid var(--gf-hair); border-radius:var(--gf-radius); padding:14px; transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease; }
.woocommerce ul.products li.product:hover{ transform:translateY(-3px); box-shadow:0 10px 26px rgba(22,25,26,.10); border-color:var(--gf-hair-2); }
.woocommerce ul.products li.product a img{ border-radius:8px; margin-bottom:12px; aspect-ratio:4/3; object-fit:cover; background:var(--gf-sunk); }
.woocommerce ul.products li.product .woocommerce-loop-product__title{ font-size:.94rem; font-weight:600; line-height:1.5; padding:0; color:var(--gf-ink); }
.woocommerce ul.products li.product .price{ color:var(--gf-ink); font-weight:700; }
.woocommerce ul.products li.product .price .gf-from{ color:var(--gf-filament-ink); font-weight:600; font-size:.82em; }

/* the extrusion-line CTA */
.woocommerce a.button,.woocommerce button.button,.woocommerce #respond input#submit,.woocommerce .single_add_to_cart_button{
  font:inherit; font-weight:600; background:var(--gf-anthracite); color:#fff; border:0; border-radius:100px;
  padding:11px 20px; min-height:44px; cursor:pointer; transition:background .2s,transform .1s; }
.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce .single_add_to_cart_button:hover{ background:#000; }
.woocommerce a.button:active,.woocommerce button.button:active{ transform:translateY(1px); }
.woocommerce a.button.alt,.woocommerce .single_add_to_cart_button{ background:var(--gf-filament); color:#16191A; }
.woocommerce a.button.alt:hover,.woocommerce .single_add_to_cart_button:hover{ background:var(--gf-filament-ink); color:#fff; }

/* headings get the extrusion underline */
.woocommerce-products-header__title,.woocommerce div.product .product_title{ position:relative; font-weight:700; padding-bottom:.35em; }
.woocommerce-products-header__title::after,.woocommerce div.product .product_title::after{
  content:""; position:absolute; inset-inline-start:0; bottom:0; width:64px; height:3px; border-radius:2px;
  background:linear-gradient(90deg,var(--gf-filament),transparent); }

/* breadcrumb */
.woocommerce .woocommerce-breadcrumb{ color:var(--gf-muted); font-size:.82rem; }
.woocommerce .woocommerce-breadcrumb a{ color:var(--gf-muted); }

/* single product */
.woocommerce div.product p.price,.woocommerce div.product span.price{ color:var(--gf-ink); font-weight:700; font-size:1.5rem; }
.woocommerce div.product p.price .gf-from{ color:var(--gf-filament-ink); font-size:.7em; font-weight:600; }
.woocommerce div.product .woocommerce-product-details__short-description{ color:var(--gf-muted); }
.woocommerce .quantity .qty{ border:1px solid var(--gf-hair-2); border-radius:8px; min-height:44px; }

/* category tiles */
.woocommerce ul.products li.product-category h2{ font-size:1rem; font-weight:600; }
.woocommerce ul.products li.product-category mark,.woocommerce ul.products li.product-category .count{ background:var(--gf-sunk); color:var(--gf-muted); border-radius:100px; }

/* notices in brand */
.woocommerce-message,.woocommerce-info{ border-top-color:var(--gf-filament); border-radius:8px; }
.woocommerce-message::before,.woocommerce-info::before{ color:var(--gf-filament); }

/* ---- accessibility / motion ------------------------------------------ */
body.gf-store a:focus-visible,body.gf-store button:focus-visible,.woocommerce a.button:focus-visible{ outline:2px solid var(--gf-filament-ink); outline-offset:2px; }
@media (prefers-reduced-motion:reduce){ body.gf-store *{ transition:none!important; animation:none!important; } }

/* ---- dark scheme (respect viewer OS) --------------------------------- */
@media (prefers-color-scheme:dark){
  :root{ --gf-melamine:#14181A; --gf-surface:#1B2123; --gf-sunk:#12171A; --gf-ink:#EAEDEC; --gf-muted:#98A09D; --gf-hair:#2A3134; --gf-hair-2:#3A4245; --gf-filament-ink:#CBAE72; }
  body.gf-store ul.products li.product a img{ background:var(--gf-sunk); }
}

/* ==== homepage landing (shortcode [gridfinity_home]) ================== */
.gfh{ direction:rtl; color:var(--gf-ink); }
.gfh *{ box-sizing:border-box; }
.gfh-hero{ position:relative; border-radius:18px; overflow:hidden; background:var(--gf-anthracite); color:#EAEDEC; margin:0 0 28px; isolation:isolate; }
.gfh-hero img.bg{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.42; z-index:-1; }
.gfh-hero::before{ /* 42mm grid cue */ content:""; position:absolute; inset:0; z-index:-1;
  background-image:linear-gradient(#B79A5E22 1px,transparent 1px),linear-gradient(90deg,#B79A5E22 1px,transparent 1px);
  background-size:42px 42px; mask-image:linear-gradient(180deg,transparent,#000 60%); }
.gfh-hero .in{ padding:clamp(28px,6vw,72px) clamp(22px,5vw,60px); max-width:40rem; }
.gfh-eyebrow{ color:var(--gf-filament); font-weight:700; font-size:.78rem; letter-spacing:.12em; margin:0 0 10px; }
.gfh-hero h1{ font-size:clamp(1.7rem,4.5vw,3rem); font-weight:700; line-height:1.25; margin:0 0 14px; text-wrap:balance; }
.gfh-hero p.lead{ font-size:1.02rem; color:#C7CCCA; margin:0 0 24px; max-width:34ch; }
.gfh-cta{ display:flex; flex-wrap:wrap; gap:12px; }
.gfh-btn{ display:inline-flex; align-items:center; gap:8px; font-weight:600; text-decoration:none; border-radius:100px; padding:13px 24px; min-height:48px; transition:transform .12s,background .2s,border-color .2s; }
.gfh-btn.primary{ background:var(--gf-filament); color:#16191A; }
.gfh-btn.primary:hover{ background:#fff; }
.gfh-btn.ghost{ border:1px solid rgba(255,255,255,.35); color:#EAEDEC; }
.gfh-btn.ghost:hover{ border-color:#fff; background:rgba(255,255,255,.08); }
.gfh-btn:active{ transform:translateY(1px); }

.gfh-strip{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:0 0 30px; }
.gfh-strip .cell{ background:var(--gf-surface); border:1px solid var(--gf-hair); border-radius:var(--gf-radius); padding:16px; }
.gfh-strip .cell b{ display:block; font-size:1.05rem; margin-bottom:4px; }
.gfh-strip .cell span{ color:var(--gf-muted); font-size:.86rem; }
@media(max-width:620px){ .gfh-strip{ grid-template-columns:1fr; } }

.gfh-h2{ font-size:1.3rem; font-weight:700; margin:0 0 16px; position:relative; padding-bottom:.3em; }
.gfh-h2::after{ content:""; position:absolute; inset-inline-start:0; bottom:0; width:56px; height:3px; border-radius:2px; background:linear-gradient(90deg,var(--gf-filament),transparent); }
.gfh-cats{ display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:14px; margin:0 0 34px; }
.gfh-cat{ position:relative; display:block; border-radius:var(--gf-radius); overflow:hidden; aspect-ratio:4/3; text-decoration:none; border:1px solid var(--gf-hair); }
.gfh-cat img{ width:100%; height:100%; object-fit:cover; transition:transform .3s ease; }
.gfh-cat:hover img{ transform:scale(1.05); }
.gfh-cat .lbl{ position:absolute; inset-inline:0; bottom:0; padding:10px 12px; color:#fff; font-weight:600; font-size:.9rem;
  background:linear-gradient(0deg,rgba(0,0,0,.72),transparent); }
