/* ===== پایه ===== */
:root {
  --primary: #c2185b;
  --primary-dark: #8e0f42;
  --dark: #1f2330;
  --text: #2b2f3a;
  --muted: #7a7f8c;
  --border: #e6e7ec;
  --bg: #f6f6f9;
  --card: #fff;
  --green: #16a34a;
  --red: #dc2626;
  --orange: #ea8a0c;
  --blue: #2563eb;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(20, 20, 40, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Vazirmatn, Tahoma, sans-serif; background: var(--bg); color: var(--text); line-height: 1.8; font-size: 15px; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; margin: 0 0 .8rem; }
h3, h4 { margin: 0 0 .5rem; }
input, select, textarea, button { font: inherit; color: inherit; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.main { min-height: 60vh; padding-top: 20px; padding-bottom: 40px; }
.muted { color: var(--muted); }
.center { text-align: center; display: block; }
.mt { margin-top: 16px; }
.text-red { color: var(--red) !important; }
.text-green { color: var(--green); }

/* ===== دکمه‌ها و فرم ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-weight: 600; transition: .15s; background: #eee; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { color: #fff; opacity: .9; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-outline:disabled { border-color: #ccc; color: #aaa; background: none; }
.btn-danger { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-link, .btn-icon { background: none; border: 0; cursor: pointer; color: var(--primary); padding: 4px; }
.btn-icon { color: var(--muted); font-size: 1.1rem; }
.btn-block { width: 100%; margin-top: 10px; }
.btn-sm { padding: 5px 12px; font-size: .85rem; }

input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
input[type=color] { width: 48px; height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: #fff; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .92rem; }
.field-check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.field-check label { margin: 0; order: 2; }
.req { color: var(--red); }
.help { color: var(--muted); display: block; font-size: .8rem; }
.error { color: var(--red); display: block; font-size: .85rem; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red) !important; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .field:has(textarea) { grid-column: 1 / -1; }
.row-2 { display: flex; gap: 8px; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 12px; background: #eef2ff; border: 1px solid #c7d2fe; }
.alert-success { background: #ecfdf3; border-color: #a6e9c0; }
.alert-error { background: #fef2f2; border-color: #fbcaca; }
.alert-warning { background: #fff8e6; border-color: #fde0a0; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.narrow { max-width: 520px; margin: 0 auto; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); background: #fff; border-radius: var(--radius); }
.breadcrumb { color: var(--muted); font-size: .85rem; margin-bottom: 16px; }
.badge { background: var(--primary); color: #fff; border-radius: 99px; padding: 0 7px; font-size: .75rem; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); vertical-align: middle; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px; border-bottom: 1px solid var(--border); text-align: right; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.table.small td, .table.small th { padding: 6px; font-size: .85rem; text-align: center; }
.table-wrap { overflow-x: auto; }

/* ===== هدر ===== */
.header { background: #fff; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--primary); white-space: nowrap; }
.search { flex: 1; max-width: 480px; }
.search input { background: var(--bg) !important; border-color: transparent !important; }
.header-actions { display: flex; align-items: center; gap: 16px; margin-right: auto; }
.menu-btn { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; }
.main-nav { border-top: 1px solid var(--border); }
.main-nav .container { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { display: block; padding: 10px 12px; font-size: .92rem; }
.nav-item { position: relative; }
.dropdown { display: none; position: absolute; top: 100%; right: 0; background: #fff; box-shadow: var(--shadow); border-radius: 10px; min-width: 180px; padding: 6px 0; }
.nav-item:hover .dropdown { display: block; }

/* ===== صفحه اول ===== */
.hero { background: linear-gradient(135deg, #fde2ec, #f3e8ff); border-radius: 20px; padding: 70px 30px; text-align: center; }
.hero h1 { font-size: 2.2rem; }
.slider { position: relative; height: 380px; border-radius: 20px; overflow: hidden; }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .8s; display: flex; align-items: flex-end; }
.slide.active { opacity: 1; z-index: 1; }
.slide-text { background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; width: 100%; padding: 30px; }
.slide-text h2 { font-size: 1.8rem; }
.section { margin-top: 32px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-head a { color: var(--primary); font-size: .9rem; }
.cat-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.cat-chip { flex: 0 0 auto; background: #fff; border-radius: 14px; padding: 10px 18px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); font-weight: 600; }
.cat-chip img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.features div { background: #fff; border-radius: var(--radius); padding: 20px; text-align: center; font-size: 1.6rem; display: flex; flex-direction: column; }
.features strong { font-size: 1rem; }
.features span { font-size: .85rem; color: var(--muted); }

/* ===== کارت محصول ===== */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-3px); color: inherit; }
.product-img { position: relative; aspect-ratio: 3 / 4; background: #f0f0f3; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 10px; right: 10px; padding: 0 10px; border-radius: 99px; font-size: .8rem; color: #fff; font-weight: 700; }
.tag.inline { position: static; display: inline-block; }
.tag-sale { background: var(--red); }
.tag-out { background: rgba(0,0,0,.6); right: auto; left: 10px; }
.product-info { padding: 12px 14px; }
.product-info h3 { font-size: .95rem; font-weight: 600; margin-bottom: 4px; height: 3.4em; overflow: hidden; }
.colors { display: flex; gap: 4px; min-height: 16px; margin-bottom: 4px; }
.colors .dot { width: 12px; height: 12px; }
.price { display: flex; flex-direction: column; align-items: flex-end; }
.price del { color: var(--muted); font-size: .82rem; }
.price strong { font-size: 1rem; }
.price.big { flex-direction: row; align-items: center; gap: 10px; margin: 10px 0 20px; }
.price.big strong { font-size: 1.5rem; color: var(--primary); }

/* ===== لیست محصولات ===== */
.list-layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: 130px; }
.filter-toggle { display: none; width: 100%; }
.filter-form { background: #fff; padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow); }
.filter-box { border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 12px; }
.filter-box h4 { font-size: .9rem; }
.filter-box label, .filter-box > a { display: block; font-size: .9rem; cursor: pointer; }
.list-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.list-head h1 { margin: 0; font-size: 1.25rem; }
.list-head small { color: var(--muted); font-weight: 400; font-size: .85rem; }
.sort { display: flex; gap: 6px; flex-wrap: wrap; font-size: .88rem; }
.sort a { padding: 4px 12px; border-radius: 99px; }
.sort a.active { background: var(--primary); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip input { display: none; }
.chip span, .opt { display: inline-block; padding: 4px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: #fff; font-size: .9rem; }
.chip input:checked + span, .opt.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.opt.disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.opt-color { width: 34px; height: 34px; border-radius: 50%; padding: 0; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.opt-color.selected { box-shadow: 0 0 0 2px var(--primary); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 24px; }
.pagination a { background: #fff; padding: 6px 16px; border-radius: 8px; box-shadow: var(--shadow); }

/* ===== صفحه محصول ===== */
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.gallery #main-img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs img { width: 70px; height: 90px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.thumbs img:hover { border-color: var(--primary); }
.option-group { margin-bottom: 14px; }
.buy-row { display: flex; gap: 10px; }
.buy-row .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 36px; height: 40px; border: 0; background: none; cursor: pointer; font-size: 1.1rem; }
.qty input { width: 48px !important; border: 0 !important; text-align: center; padding: 0 !important; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.specs { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--border); }
.specs li { display: flex; gap: 10px; padding: 6px 0; font-size: .92rem; }
.specs span { color: var(--muted); min-width: 110px; }
.rating { color: var(--orange); }
.review { border-bottom: 1px solid var(--border); padding: 10px 0; }
.review p { margin: 4px 0 0; }
.stars { color: var(--orange); }
.review-form { margin-top: 16px; max-width: 500px; }

/* ===== سبد و پرداخت ===== */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; margin-top: 16px; }
.cart-item { display: grid; grid-template-columns: 80px 1fr auto auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border: 0; }
.cart-item img { width: 80px; height: 100px; object-fit: cover; border-radius: 8px; }
.cart-info { font-size: .92rem; }
.summary { position: sticky; top: 130px; }
.summary-list { list-style: none; padding: 0; margin: 10px 0; }
.summary-list li { display: flex; justify-content: space-between; padding: 6px 0; }
.summary-list .total { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 12px; font-weight: 800; font-size: 1.05rem; }
.discount-form { display: flex; gap: 8px; margin-bottom: 10px; }
.discount-form .alert { flex: 1; margin: 0; }
.mini-item { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; font-size: .88rem; }
.mini-item img { width: 46px; height: 58px; object-fit: cover; border-radius: 6px; }
.steps { display: flex; list-style: none; padding: 0; margin: 0 0 20px; gap: 8px; counter-reset: s; }
.steps li { flex: 1; text-align: center; padding: 10px; background: #fff; border-radius: 10px; color: var(--muted); font-size: .9rem; counter-increment: s; }
.steps li::before { content: counter(s) ". "; }
.steps li.done { color: var(--green); }
.steps li.active { background: var(--primary); color: #fff; font-weight: 700; }
.pay-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.amount { background: var(--primary-soft); padding: 14px; border-radius: 10px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.amount strong { color: var(--primary); font-size: 1.3rem; }
.bank-card { background: linear-gradient(135deg, #1f2330, #4a4f63); color: #fff; border-radius: 16px; padding: 24px; margin-bottom: 12px; }
.bank-name { opacity: .8; }
.card-number { font-size: 1.6rem; letter-spacing: 3px; font-weight: 800; text-align: center; margin: 18px 0; }
.btn-copy { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 4px 12px; cursor: pointer; font-size: .85rem; }
.btn-copy.light { background: rgba(255,255,255,.15); color: #fff; border: 0; margin-top: 12px; }
.btn-copy.copied { background: var(--green); color: #fff; }
.hint-list { padding-right: 20px; font-size: .92rem; }
.timeline { display: flex; margin: 10px 0 20px; }
.tl-step { flex: 1; text-align: center; font-size: .82rem; color: var(--muted); position: relative; padding-top: 26px; }
.tl-step::before { content: ''; position: absolute; top: 4px; right: 50%; transform: translateX(50%); width: 16px; height: 16px; border-radius: 50%; background: var(--border); z-index: 1; }
.tl-step::after { content: ''; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--border); }
.tl-step:last-child::after { display: none; }
.tl-step.done { color: var(--green); font-weight: 700; }
.tl-step.done::before, .tl-step.done::after { background: var(--green); }

.status { display: inline-block; padding: 2px 12px; border-radius: 99px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.status-orange { background: #fff4e0; color: #b45309; }
.status-blue { background: #e0ecff; color: #1d4ed8; }
.status-red { background: #fee2e2; color: #b91c1c; }
.status-purple { background: #f1e6ff; color: #7e22ce; }
.status-teal { background: #dcf7f4; color: #0f766e; }
.status-green { background: #dcfce7; color: #15803d; }
.status-gray { background: #eee; color: #666; }

/* ===== حساب کاربری ===== */
.account-layout { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
.account-menu { display: flex; flex-direction: column; padding: 10px; }
.account-menu a, .account-menu button { padding: 10px 12px; border-radius: 8px; text-align: right; }
.account-menu a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.order-row { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr auto; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.prose details { border-bottom: 1px solid var(--border); padding: 10px 0; }
.prose summary { cursor: pointer; font-weight: 600; }

/* ===== فوتر ===== */
.footer { background: var(--dark); color: #cfd2db; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding: 40px 16px; }
.footer h3, .footer h4 { color: #fff; }
.footer a { display: block; padding: 2px 0; }
.footer a:hover { color: #fff; }
.copyright { text-align: center; padding: 14px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }

/* ===== موبایل ===== */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cart-layout, .pay-layout { grid-template-columns: 1fr; }
  .summary, .filters { position: static; }
}
@media (max-width: 768px) {
  body { font-size: 14px; }
  .menu-btn { display: block; }
  .header-row { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .hide-sm { display: none; }
  .main-nav { display: none; }
  body.menu-open .main-nav { display: block; }
  .main-nav .container { flex-direction: column; }
  .dropdown { position: static; display: block; box-shadow: none; padding-right: 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .list-layout, .product-page, .account-layout { grid-template-columns: 1fr; }
  .filter-toggle { display: flex; }
  .filter-form { display: none; margin-top: 8px; }
  .filters.open .filter-form { display: block; }
  .product-page { padding: 14px; gap: 16px; }
  .features { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 70px 1fr auto; }
  .cart-item img { width: 70px; height: 88px; }
  .cart-total { grid-column: 2; }
  .order-row { grid-template-columns: 1fr 1fr; }
  .slider { height: 220px; }
  .card-number { font-size: 1.2rem; letter-spacing: 1px; }
  .steps li { font-size: .75rem; padding: 6px; }
}

/* ===== قابل شخصی‌سازی از پنل ===== */
.announcement { background: var(--dark); color: #fff; text-align: center; padding: 6px 16px; font-size: .88rem; }
.logo img { max-height: 48px; width: auto; }
.extra-note { margin-top: 10px; font-size: .9rem; color: var(--green); }
