/* =========================================================
   WoodCam — Design tokens & base styles
   Signature motif: the "wood-shaving curl" from the logo,
   reused as a divider/underline everywhere. Layout borrows the
   look of a CNC bed: ruled edges + coordinate read-outs.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  --ink:        #221f1c;
  --night:      #17140f;
  --night-2:    #221e17;
  --brand-red:  #d8342a;
  --brand-red-dark:#a92419;
  --walnut:     #8a5a34;
  --walnut-lt:  #c99a68;
  --birch:      #f2e9d8;
  --paper:      #fbf8f3;
  --steel:      #6e7176;
  --steel-lt:   #d8d4cc;
  --line:       #e4ddd0;
  --success:    #4c7a45;

  --font-display: 'Vazirmatn', sans-serif;
  --font-body: 'Vazirmatn', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 6px;
  --container: 1200px;
  --shadow-sm: 0 1px 3px rgba(23,20,15,.08);
  --shadow-md: 0 8px 24px rgba(23,20,15,.12);
  --shadow-lg: 0 20px 50px rgba(23,20,15,.22);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-body);
  background:var(--paper);
  color:var(--ink);
  direction:rtl;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; cursor:pointer; }
input,textarea,select{ font-family:inherit; }

.container{ max-width:var(--container); margin:0 auto; padding:0 24px; }

.mono{ font-family:var(--font-mono); letter-spacing:.02em; }

/* ---------- Signature: shaving-curl divider ---------- */
.curl-divider{ display:flex; align-items:center; gap:14px; margin:14px 0 26px; }
.curl-divider svg{ flex:0 0 auto; }
.curl-divider .curl-line{ stroke:var(--brand-red); }
.curl-divider.center{ justify-content:center; }
.curl-divider .txt{ font-family:var(--font-mono); font-size:12px; letter-spacing:.12em; color:var(--steel); text-transform:uppercase; }

/* ---------- CNC grid backdrop ---------- */
.grid-bed{
  position:relative;
  background-image:
    linear-gradient(var(--night-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--night-2) 1px, transparent 1px);
  background-size:36px 36px;
  background-position:center;
}
.coord-tag{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--walnut-lt);
  letter-spacing:.05em;
  opacity:.85;
}

/* ============== HEADER ============== */
.site-header{
  position:sticky; top:0; z-index:100;
  background:rgba(251,248,243,.92);
  backdrop-filter:saturate(140%) blur(8px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  height:78px; gap:24px;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand img{ height:40px; width:auto; }
.main-nav{ display:flex; align-items:center; gap:6px; }
.main-nav a{
  padding:10px 16px; border-radius:var(--radius);
  font-weight:600; font-size:15px; color:var(--ink);
  position:relative; transition:color .15s;
}
.main-nav a:hover{ color:var(--brand-red); }
.main-nav a.active{ color:var(--brand-red); }
.main-nav a.active::after{
  content:''; position:absolute; right:16px; left:16px; bottom:4px; height:2px; background:var(--brand-red);
}
.header-actions{ display:flex; align-items:center; gap:8px; }
.icon-btn{
  width:42px; height:42px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  border:1px solid var(--line); background:var(--paper); position:relative;
  transition:border-color .15s, background .15s;
}
.icon-btn:hover{ border-color:var(--brand-red); }
.icon-btn svg{ width:19px; height:19px; stroke:var(--ink); }
.cart-badge{
  position:absolute; top:-4px; left:-4px;
  background:var(--brand-red); color:#fff;
  font-size:10px; font-weight:700; min-width:18px; height:18px;
  border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-family:var(--font-mono); padding:0 3px;
}
.burger{ display:none; }

/* ============== BUTTONS ============== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 26px; border-radius:var(--radius);
  font-weight:700; font-size:15px; border:2px solid transparent;
  transition:transform .15s, box-shadow .15s, background .15s, color .15s, border-color .15s;
  white-space:nowrap;
}
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:var(--brand-red); color:#fff; }
.btn-primary:hover{ background:var(--brand-red-dark); box-shadow:var(--shadow-md); }
.btn-dark{ background:var(--night); color:var(--birch); }
.btn-dark:hover{ background:#000; }
.btn-outline{ border-color:var(--ink); color:var(--ink); background:transparent; }
.btn-outline:hover{ background:var(--ink); color:#fff; }
.btn-outline-light{ border-color:rgba(242,233,216,.5); color:var(--birch); background:transparent; }
.btn-outline-light:hover{ border-color:var(--birch); background:rgba(242,233,216,.08); }
.btn-block{ width:100%; }
.btn-sm{ padding:9px 16px; font-size:13px; }
.btn[disabled]{ opacity:.55; cursor:not-allowed; }

/* ============== HERO ============== */
.hero{
  position:relative; overflow:hidden;
  background:var(--night); color:var(--birch);
  padding:76px 0 92px;
}
.hero::before{
  content:''; position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(242,233,216,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242,233,216,.05) 1px, transparent 1px);
  background-size:44px 44px;
  mask-image:radial-gradient(ellipse at 70% 30%, black 20%, transparent 72%);
}
.hero-inner{
  position:relative; display:grid; grid-template-columns:1.05fr .95fr; gap:48px; align-items:center;
}
.hero-eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:12px; letter-spacing:.1em;
  color:var(--walnut-lt); border:1px solid rgba(201,154,104,.4);
  padding:6px 14px; border-radius:30px; margin-bottom:22px;
}
.hero-eyebrow .dot{ width:6px; height:6px; border-radius:50%; background:var(--brand-red); }
.hero h1{
  font-size:clamp(34px,4.4vw,58px); font-weight:800; line-height:1.18; margin:0 0 20px;
}
.hero h1 span{ color:var(--brand-red); }
.hero p.lead{ font-size:17px; color:#cfc6b4; max-width:520px; margin:0 0 34px; }
.hero-cta{ display:flex; gap:14px; flex-wrap:wrap; }
.hero-stats{ display:flex; gap:34px; margin-top:52px; flex-wrap:wrap; }
.hero-stats .stat b{ display:block; font-family:var(--font-mono); font-size:28px; color:#fff; }
.hero-stats .stat span{ font-size:13px; color:#a89d87; }

.hero-visual{ position:relative; }
.hero-frame{
  position:relative; border:1px solid rgba(242,233,216,.18); border-radius:10px;
  padding:18px; background:linear-gradient(160deg, rgba(242,233,216,.06), transparent);
}
.hero-frame img{ border-radius:6px; width:100%; }
.hero-frame .tag-tl, .hero-frame .tag-br{
  position:absolute; font-family:var(--font-mono); font-size:11px; color:var(--walnut-lt);
}
.hero-frame .tag-tl{ top:8px; right:16px; } .hero-frame .tag-br{ bottom:8px; left:16px; }
.corner-tick{ position:absolute; width:14px; height:14px; border-color:var(--walnut-lt); }
.corner-tick.tl{ top:-1px; right:-1px; border-top:2px solid; border-right:2px solid; }
.corner-tick.br{ bottom:-1px; left:-1px; border-bottom:2px solid; border-left:2px solid; }

.hero-frame-logo{ display:flex; align-items:center; justify-content:center; min-height:340px; background:linear-gradient(160deg,#f2e9d8,#e4ddd0); border-radius:6px; }
.hero-frame-logo .tag-tl, .hero-frame-logo .tag-br, .hero-frame-logo .corner-tick{ color:var(--walnut); border-color:var(--walnut) !important; }
.hero-logo-wrap{ padding:30px; }
.hero-logo-img{ width:100%; max-width:320px; filter:drop-shadow(0 12px 28px rgba(0,0,0,.25)); }

/* ============== SECTION GENERIC ============== */
.section{ padding:84px 0; }
.section.tight{ padding:56px 0; }
.section-head{ margin-bottom:44px; display:flex; align-items:flex-end; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.section-head h2{ font-size:clamp(26px,3vw,36px); font-weight:800; margin:0 0 6px; }
.section-head p{ color:var(--steel); margin:0; max-width:520px; }
.eyebrow-label{ font-family:var(--font-mono); font-size:12px; letter-spacing:.14em; color:var(--brand-red); text-transform:uppercase; margin:0 0 10px; }
.bg-alt{ background:var(--birch); }
.bg-night{ background:var(--night); color:var(--birch); }
.bg-night .eyebrow-label{ color:var(--walnut-lt); }

/* ============== GRIDS / CARDS ============== */
.grid{ display:grid; gap:24px; }
.grid-4{ grid-template-columns:repeat(4,1fr); }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-2{ grid-template-columns:repeat(2,1fr); }

.cat-card{
  position:relative; border-radius:var(--radius); overflow:hidden; aspect-ratio:4/3;
  background:var(--night); display:flex; align-items:flex-end; padding:20px;
  box-shadow:var(--shadow-sm); transition:transform .2s, box-shadow .2s;
}
.cat-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); }
.cat-card img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.55; transition:opacity .2s, transform .3s; }
.cat-card:hover img{ opacity:.72; transform:scale(1.04); }
.cat-card::after{ content:''; position:absolute; inset:0; background:linear-gradient(0deg, rgba(23,20,15,.9), transparent 60%); }
.cat-card .cat-name{ position:relative; color:#fff; font-weight:700; font-size:17px; }
.cat-card .cat-count{ position:relative; color:var(--walnut-lt); font-family:var(--font-mono); font-size:12px; margin-top:4px; }

/* Category cards without external photos (icon-based) */
.cat-card-icon{
  aspect-ratio:auto; background:#fff; border:1px solid var(--line);
  flex-direction:column; align-items:flex-start; gap:10px; padding:26px 22px;
}
.cat-card-icon::after{ display:none; }
.cat-card-icon:hover{ border-color:var(--brand-red); }
.cat-icon-wrap{
  width:50px; height:50px; border-radius:50%; background:var(--birch);
  display:flex; align-items:center; justify-content:center;
}
.cat-icon-wrap svg{ width:22px; height:22px; color:var(--brand-red); }
.cat-card-icon .cat-name{ color:var(--ink); font-size:16px; }
.cat-card-icon .cat-count{ color:var(--steel); }

/* About us section */
.about-grid{ display:grid; grid-template-columns:1.1fr .9fr; gap:50px; align-items:center; }
.about-text-col h2{ font-size:clamp(24px,3vw,32px); font-weight:800; margin:0 0 18px; }
.about-teaser{ color:#453f35; font-size:15.5px; line-height:2; margin:0 0 26px; }
.about-img-col{ position:relative; }
.about-img-col img{ width:100%; border-radius:10px; aspect-ratio:4/3; object-fit:cover; box-shadow:var(--shadow-md); }
@media (max-width:900px){ .about-grid{ grid-template-columns:1fr; } .about-img-col{ order:-1; } }

/* Star rating rows */
.star-row svg{ display:inline-block; }
.review-card{ border-bottom:1px solid var(--line); padding:18px 0; }
.review-card:last-child{ border-bottom:none; }

.product-card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; display:flex; flex-direction:column; transition:transform .2s, box-shadow .2s, border-color .2s;
}
.product-card:hover{ transform:translateY(-5px); box-shadow:var(--shadow-md); border-color:transparent; }
.product-card .thumb{ position:relative; aspect-ratio:4/3; background:var(--birch); overflow:hidden; }
.product-card .thumb img{ width:100%; height:100%; object-fit:cover; transition:transform .35s; }
.product-card:hover .thumb img{ transform:scale(1.06); }
.product-card .thumb .cat-pill{
  position:absolute; top:12px; right:12px; background:rgba(23,20,15,.75); color:var(--birch);
  font-size:11px; padding:5px 10px; border-radius:20px; font-family:var(--font-mono);
}
.product-card .body{ padding:18px; display:flex; flex-direction:column; gap:10px; flex:1; }
.product-card h3{ font-size:16.5px; margin:0; font-weight:700; }
.product-card .desc{ font-size:13.5px; color:var(--steel); margin:0; flex:1;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.product-card .foot{ display:flex; align-items:center; justify-content:space-between; margin-top:6px; gap:10px; }
.price-note{ font-family:var(--font-mono); font-size:12px; color:var(--steel); }

.feature-card{ padding:28px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; }
.feature-card .ic{
  width:52px; height:52px; border-radius:50%; background:var(--birch);
  display:flex; align-items:center; justify-content:center; margin-bottom:18px;
}
.feature-card .ic svg{ width:24px; height:24px; stroke:var(--brand-red); }
.feature-card h3{ font-size:17px; margin:0 0 8px; }
.feature-card p{ color:var(--steel); font-size:14px; margin:0; }

/* Portfolio */
.folio-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.folio-item{ position:relative; border-radius:var(--radius); overflow:hidden; aspect-ratio:1/1; }
.folio-item img{ width:100%; height:100%; object-fit:cover; transition:transform .4s; }
.folio-item:hover img{ transform:scale(1.08); }
.folio-item .cap{
  position:absolute; inset:auto 0 0 0; padding:16px; color:#fff;
  background:linear-gradient(0deg, rgba(23,20,15,.88), transparent);
  opacity:0; transition:opacity .2s; font-weight:700; font-size:14px;
}
.folio-item:hover .cap{ opacity:1; }

/* CTA banner */
.cta-banner{
  background:var(--brand-red); color:#fff; border-radius:14px; padding:50px 44px;
  display:flex; align-items:center; justify-content:space-between; gap:30px; flex-wrap:wrap;
  position:relative; overflow:hidden;
}
.cta-banner h2{ font-size:26px; margin:0 0 8px; }
.cta-banner p{ margin:0; color:rgba(255,255,255,.85); }
.cta-banner .btn-dark{ background:var(--night); }

/* ============== FOOTER ============== */
footer.site-footer{ background:var(--night); color:#cfc6b4; padding:64px 0 0; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1.2fr; gap:40px; padding-bottom:48px; border-bottom:1px solid rgba(242,233,216,.1); }
.footer-grid h4{ color:#fff; font-size:15px; margin:0 0 18px; }
.footer-grid img{ height:34px; margin-bottom:14px; }
.footer-grid p{ font-size:13.5px; color:#a89d87; line-height:1.9; }
.footer-grid ul li{ margin-bottom:11px; }
.footer-grid ul a{ font-size:13.5px; color:#cfc6b4; transition:color .15s; }
.footer-grid ul a:hover{ color:var(--brand-red); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; padding:22px 0; font-size:12.5px; color:#8b8168; flex-wrap:wrap; gap:10px; }
.social-row{ display:flex; gap:10px; }
.social-row a{ width:36px; height:36px; border-radius:50%; border:1px solid rgba(242,233,216,.2); display:flex; align-items:center; justify-content:center; }
.social-row a:hover{ border-color:var(--brand-red); }
.social-row svg{ width:16px; height:16px; stroke:#fff; }

/* ============== WHATSAPP FLOAT ============== */
.wa-float{
  position:fixed; bottom:26px; left:26px; z-index:200;
  width:60px; height:60px; border-radius:50%; background:#25D366;
  display:flex; align-items:center; justify-content:center; box-shadow:0 8px 24px rgba(37,211,102,.45);
  animation:wa-pulse 2.6s infinite;
}
.wa-float svg{ width:30px; height:30px; fill:#fff; }
@keyframes wa-pulse{
  0%{ box-shadow:0 0 0 0 rgba(37,211,102,.55); }
  70%{ box-shadow:0 0 0 16px rgba(37,211,102,0); }
  100%{ box-shadow:0 0 0 0 rgba(37,211,102,0); }
}

/* ============== BREADCRUMB ============== */
.breadcrumb{ font-size:13px; color:var(--steel); padding:20px 0; display:flex; gap:8px; align-items:center; }
.breadcrumb a:hover{ color:var(--brand-red); }

/* ============== FORMS ============== */
.field{ margin-bottom:18px; }
.field label{ display:block; font-size:13.5px; font-weight:600; margin-bottom:8px; }
.field input, .field textarea, .field select{
  width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:var(--radius);
  font-size:14.5px; background:#fff; transition:border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus{ outline:none; border-color:var(--brand-red); }
.field textarea{ resize:vertical; min-height:110px; }
.form-card{ background:#fff; border:1px solid var(--line); border-radius:10px; padding:36px; max-width:520px; margin:0 auto; }
.form-card h2{ margin:0 0 6px; font-size:22px; }
.form-card .sub{ color:var(--steel); font-size:14px; margin:0 0 28px; }
.alert{ padding:13px 16px; border-radius:var(--radius); font-size:14px; margin-bottom:18px; }
.alert-error{ background:#fbe4e1; color:var(--brand-red-dark); border:1px solid #f2c2bc; }
.alert-success{ background:#e6f0e4; color:var(--success); border:1px solid #c7dcc2; }

/* ============== PAGE HEADER (inner pages) ============== */
.page-hero{ background:var(--night); color:var(--birch); padding:52px 0; }
.page-hero h1{ font-size:clamp(24px,3vw,34px); margin:0 0 8px; font-weight:800; }
.page-hero p{ color:#a89d87; margin:0; }

/* ============== PRODUCT DETAIL ============== */
.product-detail{ display:grid; grid-template-columns:1fr 1fr; gap:56px; padding:48px 0; }
.gallery-main{ position:relative; border-radius:10px; overflow:hidden; aspect-ratio:1/1; background:var(--birch); margin-bottom:14px; }
.gallery-main img{ width:100%; height:100%; object-fit:cover; }
.gallery-thumbs{ display:flex; gap:10px; }
.gallery-thumbs img{ width:76px; height:76px; object-fit:cover; border-radius:6px; border:2px solid transparent; cursor:pointer; opacity:.7; transition:opacity .15s, border-color .15s; }
.gallery-thumbs img.active{ opacity:1; border-color:var(--brand-red); }
.pd-cat{ font-family:var(--font-mono); font-size:12px; color:var(--brand-red); text-transform:uppercase; letter-spacing:.08em; }
.pd-title{ font-size:clamp(26px,3vw,36px); font-weight:800; margin:12px 0 18px; }
.pd-shortdesc{ color:var(--steel); font-size:15px; margin-bottom:26px; }
.pd-specbar{ display:flex; gap:22px; padding:18px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin-bottom:26px; flex-wrap:wrap; }
.pd-specbar div span{ display:block; font-size:12px; color:var(--steel); margin-bottom:4px; }
.pd-specbar div b{ font-family:var(--font-mono); font-size:14px; }
.pd-actions{ display:flex; gap:12px; flex-wrap:wrap; }
.pd-note{ margin-top:16px; font-size:13px; color:var(--steel); display:flex; align-items:center; gap:8px; }

.desc-block{ padding:56px 0; border-top:1px solid var(--line); }
.desc-block h2{ font-size:22px; margin:0 0 22px; }
.desc-content{ max-width:820px; font-size:15.5px; color:#3a352e; line-height:2; white-space:pre-line; }

/* ============== CART ============== */
.cart-table{ width:100%; border-collapse:collapse; }
.cart-table th{ text-align:right; font-size:13px; color:var(--steel); padding:0 0 14px; border-bottom:1px solid var(--line); font-weight:600; }
.cart-table td{ padding:16px 0; border-bottom:1px solid var(--line); vertical-align:middle; }
.cart-item-info{ display:flex; align-items:center; gap:14px; }
.cart-item-info img{ width:64px; height:64px; object-fit:cover; border-radius:6px; }
.cart-summary{ border:1px solid var(--line); border-radius:10px; padding:26px; background:#fff; }
.cart-summary h3{ margin:0 0 18px; font-size:17px; }
.empty-state{ text-align:center; padding:80px 20px; }
.empty-state svg{ width:64px; height:64px; stroke:var(--steel-lt); margin-bottom:18px; }
.empty-state h3{ margin:0 0 8px; }
.empty-state p{ color:var(--steel); margin:0 0 24px; }

/* ============== ACCOUNT ============== */
.account-wrap{ max-width:520px; margin:0 auto; padding:60px 0; }
.tab-links{ display:flex; gap:6px; margin-bottom:26px; background:var(--birch); padding:5px; border-radius:8px; }
.tab-links a{ flex:1; text-align:center; padding:10px; border-radius:6px; font-weight:600; font-size:14px; }
.tab-links a.active{ background:#fff; box-shadow:var(--shadow-sm); color:var(--brand-red); }

/* ============== RESPONSIVE ============== */
@media (max-width: 980px){
  .hero-inner{ grid-template-columns:1fr; }
  .hero-visual{ order:-1; }
  .grid-4{ grid-template-columns:repeat(2,1fr); }
  .grid-3{ grid-template-columns:repeat(2,1fr); }
  .footer-grid{ grid-template-columns:1fr 1fr; }
  .product-detail{ grid-template-columns:1fr; gap:30px; }
  .folio-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 720px){
  .main-nav{ display:none; }
  .burger{ display:flex; }
  .grid-4, .grid-3, .grid-2{ grid-template-columns:1fr 1fr; }
  .footer-grid{ grid-template-columns:1fr; }
  .cta-banner{ flex-direction:column; text-align:center; }
  .hero-stats{ gap:22px; }
  .folio-grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width: 480px){
  .grid-4, .grid-3, .grid-2{ grid-template-columns:1fr; }
  .folio-grid{ grid-template-columns:1fr; }
  .header-inner{ height:66px; }
  .brand img{ height:32px; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}

:focus-visible{ outline:2px solid var(--brand-red); outline-offset:2px; }

/* Scroll reveal (used on product description) */
.reveal-on-scroll{ opacity:0; transform:translateY(24px); transition:opacity .6s ease, transform .6s ease; }
.reveal-on-scroll.is-visible{ opacity:1; transform:translateY(0); }

/* Admin image preview thumbnails */
#imagePreview{ display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
#imagePreview img{ width:84px; height:84px; object-fit:cover; border-radius:6px; border:1px solid var(--line); }
