
:root{
  --bg:#fcfbfd;
  --surface:#ffffff;
  --surface-2:#f5f0ff;
  --text:#241f31;
  --muted:#6f6a78;
  --line:#e8dfef;
  --accent:#9f78ff;
  --accent-dark:#6d44d8;
  --accent-soft:#f3ecff;
  --shadow:0 16px 40px rgba(60,32,110,.08);
  --radius:20px;
  --radius-sm:14px;
  --container:1200px;
  --success:#1f9d61;
  --danger:#cc3f63;
}

@font-face{
  font-family:Vazirmatn;
  src:local("Vazirmatn");
  font-weight:100 900;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Vazirmatn,Tahoma,Arial,sans-serif;
  line-height:1.75;
}

img{
  max-width:100%;
  display:block;
}

a{
  color:inherit;
  text-decoration:none;
}

button,input,textarea,select{
  font:inherit;
}

.container{
  width:min(var(--container), calc(100% - 32px));
  margin-inline:auto;
}

.narrow-container{
  width:min(860px, calc(100% - 32px));
  margin-inline:auto;
}

.section{
  padding:56px 0;
}

.alt-section{
  background:linear-gradient(180deg,#fff, #faf6ff);
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:.9rem;
  color:var(--accent-dark);
  background:var(--accent-soft);
  border:1px solid #e6d8ff;
  padding:6px 12px;
  border-radius:999px;
  margin-bottom:14px;
}

.site-header{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(232,223,239,.85);
}

.header-wrap{
  min-height:82px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.brand{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.brand-en{
  font-weight:900;
  font-size:1.15rem;
  letter-spacing:.16em;
}

.brand-fa{
  font-size:1.25rem;
  font-weight:800;
  color:var(--accent-dark);
}

.main-nav{
  display:flex;
  align-items:center;
  gap:22px;
}

.main-nav a{
  color:var(--muted);
  font-weight:600;
}

.main-nav a:hover{
  color:var(--accent-dark);
}

.header-tools{
  display:flex;
  align-items:center;
  gap:10px;
}

.tool-btn,.primary-btn,.secondary-btn{
  border:none;
  border-radius:999px;
  cursor:pointer;
  transition:.2s ease;
}

.tool-btn{
  padding:10px 16px;
  background:#fff;
  border:1px solid var(--line);
  color:var(--text);
}

.tool-btn:hover{
  border-color:#d4c4ee;
  transform:translateY(-1px);
}

.primary-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:13px 22px;
  background:linear-gradient(135deg,var(--accent),var(--accent-dark));
  color:#fff;
  font-weight:800;
  box-shadow:0 10px 24px rgba(109,68,216,.18);
}

.primary-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(109,68,216,.22);
}

.secondary-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:13px 22px;
  background:#fff;
  border:1px solid var(--line);
  color:var(--text);
  font-weight:700;
}

.secondary-btn:hover{
  border-color:#d9caef;
}

.full-btn{
  width:100%;
}

.text-link{
  color:var(--accent-dark);
  font-weight:700;
}

.text-link:hover{
  text-decoration:underline;
}

.cart-btn{
  position:relative;
}

.cart-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  border-radius:999px;
  background:var(--accent-dark);
  color:#fff;
  font-size:.78rem;
  margin-inline-start:8px;
  padding:0 6px;
}

.mobile-menu-btn{
  display:none;
  border:none;
  background:transparent;
  font-size:1.5rem;
  cursor:pointer;
}

.mobile-nav{
  display:none;
  padding:0 16px 16px;
  border-top:1px solid var(--line);
  background:#fff;
}

.mobile-nav a{
  display:block;
  padding:12px 0;
  color:var(--muted);
  border-bottom:1px dashed #eee6f8;
}

.hero-section{
  padding:60px 0 32px;
}

.hero-grid{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:32px;
  align-items:center;
}

.hero-content h1{
  font-size:clamp(2rem,4vw,3.5rem);
  line-height:1.2;
  margin:0 0 16px;
}

.hero-content p{
  color:var(--muted);
  max-width:62ch;
  margin:0 0 24px;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.hero-visual img{
  border-radius:28px;
  box-shadow:var(--shadow);
}

.section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:24px;
}

.section-head h2{
  margin:0;
  font-size:1.9rem;
}

.shop-toolbar{
  padding:18px;
  margin-bottom:24px;
}

.shop-toolbar-grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:16px;
  align-items:end;
}

.shop-search,
.shop-filter{
  display:grid;
  gap:8px;
}

.shop-results-meta{
  margin-top:12px;
  color:var(--muted);
  font-weight:700;
}

.product-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
}

.product-card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
}

.product-card.hidden{
  display:none;
}

.product-media{
  position:relative;
  background:#faf7ff;
}

.product-media img{
  aspect-ratio:4/5;
  width:100%;
  object-fit:cover;
}

.product-badge{
  position:absolute;
  top:14px;
  right:14px;
  background:#fff;
  color:var(--accent-dark);
  border:1px solid #eadfff;
  border-radius:999px;
  padding:6px 10px;
  font-size:.82rem;
  font-weight:800;
}

.product-body{
  padding:18px;
}

.product-category{
  display:inline-flex;
  background:var(--surface-2);
  color:var(--accent-dark);
  padding:3px 10px;
  border-radius:999px;
  font-size:.82rem;
  text-transform:none;
  margin-bottom:10px;
}

.product-body h3{
  margin:0 0 8px;
  font-size:1.15rem;
  line-height:1.5;
}

.product-desc{
  color:var(--muted);
  margin:0 0 16px;
  font-size:.95rem;
}

.product-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.product-meta strong{
  color:var(--accent-dark);
  font-size:1.05rem;
}

.product-card .primary-btn{
  width:100%;
  margin-top:8px;
}

.features-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
}

.feature-card,.panel,.blog-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
}

.feature-card{
  padding:24px;
}

.feature-card h3{
  margin-top:0;
}

.page-hero{
  padding:48px 0 16px;
}

.page-hero.compact h1{
  margin:0 0 8px;
}

.page-hero p{
  color:var(--muted);
  margin:0;
}

.blog-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
}

.blog-card{
  overflow:hidden;
}

.blog-card img{
  width:100%;
  aspect-ratio:16/11;
  object-fit:cover;
}

.blog-body{
  padding:18px;
}

.blog-body h3{
  margin:10px 0 8px;
}

.blog-body p{
  color:var(--muted);
  margin:0 0 10px;
}

.blog-date{
  color:var(--accent-dark);
  font-size:.9rem;
  font-weight:700;
}

.contact-panel,.article-page{
  padding:24px;
}

.contact-form,.auth-form{
  display:grid;
  gap:14px;
}

label{
  display:grid;
  gap:8px;
  font-weight:700;
}

input,textarea,select{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:16px;
  padding:13px 14px;
  outline:none;
  transition:.2s ease;
}

input:focus,textarea:focus,select:focus{
  border-color:#cdb3ff;
  box-shadow:0 0 0 4px rgba(159,120,255,.12);
}

.single-content{
  background:var(--surface);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  padding:28px;
  border-radius:24px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:32px;
  align-items:start;
}

.single-gallery img{
  width:100%;
  border-radius:22px;
  background:#faf7ff;
}

.single-info h1{
  margin:8px 0 10px;
  line-height:1.35;
}

.single-desc{
  color:var(--muted);
  margin:0 0 18px;
}

.single-price{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  background:#faf7ff;
  border:1px solid #eee5ff;
  border-radius:18px;
  margin-bottom:20px;
}

.single-price span{
  color:var(--muted);
}

.single-price strong{
  font-size:1.45rem;
  color:var(--accent-dark);
}

.single-option{
  margin-bottom:18px;
}

.single-option > span{
  display:block;
  font-weight:800;
  margin-bottom:10px;
}

.chip-group{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.chip{
  border:none;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  padding:10px 16px;
  cursor:pointer;
  transition:.2s ease;
}

.chip:hover,.chip.active{
  background:var(--accent-soft);
  border-color:#ceb7ff;
  color:var(--accent-dark);
}

.single-content .primary-btn{
  width:100%;
  padding:15px 22px;
  font-weight:800;
}

.article-cover{
  width:100%;
  border-radius:18px;
  margin-bottom:16px;
}

.site-footer{
  margin-top:40px;
  border-top:1px solid var(--line);
  background:#fff;
}

.footer-wrap{
  padding:34px 0;
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:24px;
}

.footer-wrap h4{
  margin-top:0;
  margin-bottom:10px;
}

.footer-wrap p,.footer-wrap li{
  color:var(--muted);
}

.footer-wrap ul{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:8px;
}

.copyright{
  text-align:center;
  padding:14px 16px 24px;
  color:var(--muted);
  font-size:.92rem;
}

.drawer{
  position:fixed;
  inset:0;
  display:none;
  z-index:60;
}

.drawer.active{
  display:block;
}

.drawer-backdrop{
  position:absolute;
  inset:0;
  background:rgba(26,16,45,.36);
}

.drawer-panel{
  position:absolute;
  top:0;
  left:0;
  height:100%;
  width:min(460px,100%);
  background:#fff;
  box-shadow:20px 0 50px rgba(34,18,74,.12);
  display:flex;
  flex-direction:column;
}

.drawer-head,.drawer-foot{
  padding:18px;
  border-bottom:1px solid var(--line);
}

.drawer-foot{
  border-bottom:none;
  border-top:1px solid var(--line);
}

.drawer-body{
  padding:18px;
  overflow:auto;
  flex:1;
}

.drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.icon-btn{
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:1.2rem;
}

.cart-items{
  display:grid;
  gap:14px;
}

.cart-item{
  display:grid;
  grid-template-columns:72px 1fr auto;
  gap:12px;
  align-items:center;
  border:1px solid var(--line);
  padding:12px;
  border-radius:18px;
  background:#fff;
}

.cart-item img{
  width:72px;
  height:90px;
  object-fit:cover;
  border-radius:14px;
  background:var(--surface);
}

.cart-item-info{
  display:grid;
  gap:4px;
}

.cart-item-info strong{
  line-height:1.5;
}

.cart-item-info span{
  color:var(--muted);
  font-size:.9rem;
}

.cart-item-actions{
  display:grid;
  gap:8px;
  justify-items:end;
}

.qty-controller{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  border-radius:999px;
  padding:6px 8px;
}

.qty-controller button{
  width:28px;
  height:28px;
  border:none;
  border-radius:999px;
  background:var(--accent-soft);
  color:var(--accent-dark);
  cursor:pointer;
  font-weight:800;
}

.cart-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
}

.auth-note{
  color:var(--muted);
  font-size:.92rem;
  margin-top:14px;
}

.auth-status{
  margin-top:12px;
  color:var(--accent-dark);
  font-weight:700;
}

.toast-container{
  position:fixed;
  left:16px;
  bottom:16px;
  z-index:100;
  display:grid;
  gap:10px;
}

.toast{
  min-width:260px;
  max-width:360px;
  background:#fff;
  border:1px solid var(--line);
  border-right:4px solid var(--success);
  box-shadow:var(--shadow);
  border-radius:16px;
  padding:14px 16px;
  animation:fadeInUp .25s ease;
}

.toast strong{
  display:block;
  margin-bottom:4px;
}

.toast p{
  margin:0;
  color:var(--muted);
  font-size:.92rem;
}

.empty-state{
  padding:20px;
  text-align:center;
  color:var(--muted);
}

@keyframes fadeInUp{
  from{
    opacity:0;
    transform:translateY(10px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

@media (max-width: 980px){
  .main-nav{
    display:none;
  }

  .mobile-menu-btn{
    display:block;
  }

  .hero-grid,
  .single-content,
  .footer-wrap,
  .features-grid,
  .shop-toolbar-grid{
    grid-template-columns:1fr;
  }

  .product-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .blog-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 680px){
  .container{
    width:min(100% - 24px, 100%);
  }

  .header-wrap{
    min-height:74px;
  }

  .hero-section{
    padding-top:36px;
  }

  .section{
    padding:42px 0;
  }

  .section-head{
    align-items:start;
    flex-direction:column;
  }

  .product-grid,
  .blog-grid{
    grid-template-columns:1fr;
  }

  .product-meta{
    flex-direction:column;
    align-items:start;
  }

  .drawer-panel{
    width:100%;
  }

  .cart-item{
    grid-template-columns:64px 1fr;
  }

  .cart-item .cart-item-actions{
    grid-column:1 / -1;
    justify-items:stretch;
  }

  .header-tools{
    gap:8px;
  }

  .tool-btn{
    padding:9px 12px;
  }

  .toast-container{
    left:12px;
    right:12px;
    bottom:12px;
  }

  .toast{
    min-width:auto;
    max-width:none;
  }
}
