/* ============================================================
   PardehStore Theme v1.0 — راست‌چین، الهام از WoodMart
   ============================================================ */
:root {
  --brand: #7c3aed;
  --brand-dark: #5b21b6;
  --accent: #f59e0b;
  --bg: #f7f5ff;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e9e3f7;
  --green: #16a34a;
  --red: #dc2626;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Tahoma, "Vazirmatn", "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.9;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.main { min-height: 60vh; padding-top: 20px; padding-bottom: 40px; }
.muted { color: var(--muted); }
.page-title { margin: 0 0 16px; }

/* --- دکمه‌ها --- */
.btn {
  display: inline-block; border: 1px solid var(--line); background: #fff;
  color: var(--text); padding: 9px 20px; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-size: 14px; margin: 3px;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); color: #fff; }
.btn.danger { background: #fee2e2; border-color: #fecaca; color: var(--red); }
.btn.sm { padding: 4px 12px; font-size: 13px; }
.btn.lg { padding: 13px 30px; font-size: 16px; }
.btn.block { display: block; text-align: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- فرم‌ها --- */
input, select, textarea {
  font-family: inherit; font-size: 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  width: 100%; margin: 4px 0; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: auto; margin-left: 6px; }
.frow { display: flex; gap: 10px; }
.frow > * { flex: 1; }
.check { display: flex; align-items: center; margin: 6px 0; cursor: pointer; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.form-card h3 { margin-top: 20px; border-bottom: 2px solid var(--bg); padding-bottom: 8px; }
.form-card h3:first-child { margin-top: 0; }
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; }
.toolbar input { max-width: 300px; }

/* --- پیام‌ها --- */
.alert { padding: 12px 16px; border-radius: 10px; margin: 12px 0; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.info { background: #e0e7ff; color: #3730a3; }

/* --- نوار بالا و هدر --- */
.topbar { background: var(--brand-dark); color: #ede9fe; font-size: 13px; }
.topbar-in { display: flex; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #fde68a; margin-right: 14px; }
.header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-in { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-size: 22px; color: var(--text); white-space: nowrap; }
.logo b { color: var(--brand); }
.search { display: flex; flex: 1; max-width: 500px; }
.search input { border-radius: 0 10px 10px 0; margin: 0; }
.search button { border-radius: 10px 0 0 10px; border: 1px solid var(--brand); background: var(--brand); color: #fff; padding: 0 18px; cursor: pointer; }
.header-actions { display: flex; gap: 8px; margin-right: auto; }
.hbtn { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 14px; color: var(--text); white-space: nowrap; }
.hbtn:hover { border-color: var(--brand); }
.cart-count { background: var(--accent); color: #fff; border-radius: 20px; padding: 0 9px; font-size: 13px; }
.mainnav { background: var(--brand); }
.mainnav .container { display: flex; gap: 4px; overflow-x: auto; padding-top: 0; padding-bottom: 0; }
.mainnav a { color: #fff; padding: 10px 14px; white-space: nowrap; font-size: 14px; }
.mainnav a:hover { background: var(--brand-dark); color: #fff; }
.mainnav a.hot { color: #fde68a; font-weight: bold; }

/* --- بنر --- */
.hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; }
.hero-slide {
  background: linear-gradient(135deg, #7c3aed, #a855f7 55%, #f0abfc);
  color: #fff; padding: 60px 40px; text-align: center;
}
.hero-slide h1 { margin: 0 0 8px; font-size: 34px; }
.hero-slide p { margin: 0 0 18px; font-size: 17px; }
.hero-slide .btn.primary { background: #fff; color: var(--brand-dark); border: none; }

/* --- بخش‌ها --- */
.section { margin-bottom: 30px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sec-head h2 { margin: 0; font-size: 20px; }
.cat-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.cat-circle {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  min-width: 140px; text-align: center; padding: 16px 10px; color: var(--text);
}
.cat-circle:hover { border-color: var(--brand); transform: translateY(-3px); transition: .2s; }
.cat-img { font-size: 40px; display: block; }
.cat-img img { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; }
.cat-circle small { color: var(--muted); }

/* --- ماشین‌حساب --- */
.calc-box { background: linear-gradient(135deg, #ede9fe, #fef3c7); border-radius: var(--radius); padding: 26px; text-align: center; }
.calc-grid { display: flex; gap: 24px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.calc-layouts { display: flex; gap: 14px; }
.calc-layouts label { background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 8px 16px; cursor: pointer; }
.calc-result { font-size: 19px; margin: 12px 0; }
.calc-result b { color: var(--brand-dark); }

/* --- کارت محصول --- */
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative; }
.pcard:hover { box-shadow: 0 8px 26px rgba(124,58,237,.15); transform: translateY(-3px); transition: .2s; }
.pimg { display: block; position: relative; }
.pimg img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pbody { padding: 12px; }
.pcat { font-size: 12px; color: var(--muted); }
.pname { display: block; font-weight: bold; color: var(--text); min-height: 52px; font-size: 14px; }
.prate { color: #d97706; font-size: 13px; }
.pprice { margin: 8px 0; }
.pprice del { color: var(--muted); font-size: 13px; display: block; }
.pprice b { color: var(--brand-dark); font-size: 17px; }
.badge { position: absolute; font-size: 12px; padding: 2px 10px; border-radius: 20px; color: #fff; }
.badge.off { background: var(--red); top: 10px; right: 10px; }
.badge.out { background: #6b7280; top: 10px; left: 10px; }
.badge.amazing { background: var(--accent); bottom: 10px; right: 10px; }
.badge.in { background: var(--green); position: static; }
.pro-info .badge { position: static; margin-left: 6px; }
.add-form { margin: 0; }

/* --- ویژگی‌ها --- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.features div { font-size: 30px; }
.features b, .features small { display: block; font-size: 14px; }

/* --- فروشگاه --- */
.shop-head { display: flex; justify-content: space-between; align-items: center; }
.shop-wrap { display: grid; grid-template-columns: 250px 1fr; gap: 18px; }
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; align-self: start; }
.filters h4 { margin: 14px 0 8px; font-size: 14px; }
.flist a { display: block; padding: 6px 8px; border-radius: 8px; color: var(--text); font-size: 14px; }
.flist a.active, .flist a:hover { background: var(--bg); color: var(--brand); }
.sortbar { margin-bottom: 12px; }
.sortbar select { width: auto; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 50px; text-align: center; }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 22px 0; }
.pagination a { border: 1px solid var(--line); background: #fff; padding: 6px 14px; border-radius: 8px; }
.pagination a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* --- صفحه محصول --- */
.crumbs { margin-bottom: 12px; font-size: 13px; }
.pro-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.pro-gal img#mainImg { width: 100%; border-radius: 12px; aspect-ratio: 1; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; }
.thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.thumbs img:hover { border-color: var(--brand); }
.pro-info h1 { font-size: 22px; margin: 10px 0; }
.pro-price { margin: 14px 0; }
.pro-price .big { font-size: 26px; color: var(--brand-dark); }
.buy-row { display: flex; gap: 10px; align-items: end; margin: 14px 0; }
.buy-row input { width: 90px; }
.attrs { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.attrs th, .attrs td { border: 1px solid var(--line); padding: 8px 12px; }
.attrs th { background: var(--bg); width: 35%; }
.tabs { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 18px; }
.tab-head { display: flex; border-bottom: 1px solid var(--line); }
.tab-head button { flex: 1; background: none; border: none; padding: 14px; font-family: inherit; font-size: 15px; cursor: pointer; }
.tab-head button.active { color: var(--brand); border-bottom: 3px solid var(--brand); font-weight: bold; }
.tab-body { display: none; padding: 20px; }
.tab-body.active { display: block; }
.review { border-bottom: 1px dashed var(--line); padding: 12px 0; }
.review-form { margin-top: 16px; background: var(--bg); padding: 16px; border-radius: 10px; }

/* --- سبد و تسویه --- */
.cart-wrap, .checkout-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.cart-row { display: grid; grid-template-columns: 80px 1fr 90px 120px 40px; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.cart-row img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.cart-row input { text-align: center; }
.cart-row .del { font-size: 20px; }
.cart-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; align-self: start; }
.coupon-row { display: flex; gap: 6px; }
.totals { width: 100%; border-collapse: collapse; margin: 12px 0; }
.totals td { padding: 8px 4px; border-bottom: 1px dashed var(--line); }
.totals td:last-child { text-align: left; }
.totals tr.green td { color: var(--green); }
.totals tr.total td, .sum-row.total { font-weight: bold; font-size: 17px; color: var(--brand-dark); }
.co-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.co-form h3 { margin-top: 22px; }
.co-form h3:first-child { margin-top: 0; }
.radio-card { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 8px 0; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--brand); background: #faf5ff; }
.radio-card span { margin-right: auto; color: var(--muted); font-size: 13px; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.sum-row.green { color: var(--green); }

/* --- رسید --- */
.result-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; max-width: 600px; margin: 20px auto; }
.result-box.ok { border-top: 5px solid var(--green); }
.result-box.fail { border-top: 5px solid var(--red); }
.big-emoji { font-size: 60px; }
.card-box { background: var(--bg); border-radius: 12px; padding: 16px; margin: 16px 0; }
.card-num { font-size: 24px; letter-spacing: 2px; color: var(--brand-dark); }

/* --- ورود --- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 800px; margin: 20px auto; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }

/* --- جدول --- */
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; font-size: 14px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px; text-align: right; }
.table th { background: var(--brand); color: #fff; }
.thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; }
.thumb.lg { width: 120px; height: 120px; }
.st { padding: 2px 12px; border-radius: 20px; font-size: 13px; background: #e5e7eb; }
.st.pending { background: #fef3c7; color: #92400e; }
.st.processing { background: #dbeafe; color: #1e40af; }
.st.shipped { background: #e0e7ff; color: #3730a3; }
.st.completed { background: #dcfce7; color: #166534; }
.st.cancelled, .st.refunded { background: #fee2e2; color: #991b1b; }

/* --- فوتر --- */
.footer { background: #1e1b2e; color: #c4b5fd; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 24px; padding-top: 36px; padding-bottom: 20px; }
.footer h4 { color: #fff; }
.footer a { color: #c4b5fd; display: block; padding: 2px 0; }
.footer a:hover { color: #fff; }
.footer .social a { display: inline; }
.copyright { text-align: center; border-top: 1px solid #3730a3; padding: 14px; font-size: 13px; }

/* --- مدیریت --- */
.admin-body { background: #f1f0f9; }
.admin-wrap { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { background: #1e1b2e; color: #c4b5fd; padding: 18px 12px; }
.sidebar .logo { color: #fff; display: block; margin-bottom: 16px; }
.sidebar a { display: block; color: #c4b5fd; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.sidebar a:hover, .sidebar a.active { background: var(--brand); color: #fff; }
.sidebar hr { border-color: #3730a3; }
.sidebar details.nav-group { margin: 1px 0; }
.sidebar summary { display: block; color: #c4b5fd; padding: 9px 12px; border-radius: 8px; font-size: 14px; cursor: pointer; list-style: none; }
.sidebar summary::-webkit-details-marker { display: none; }
.sidebar summary::before { content: '◀'; font-size: 10px; margin-left: 7px; opacity: .7; }
.sidebar details[open] > summary::before { content: '▼'; }
.sidebar summary:hover { background: #2a2742; color: #fff; }
.sidebar details[open] > summary { color: #fff; }
.sidebar .nav-sub { margin: 2px 14px 6px 0; padding-right: 6px; border-right: 2px solid #3730a3; }
.sidebar .nav-sub a { padding: 7px 10px; font-size: 13.5px; }
/* --- تنظیمات منو --- */
.mrow { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.mrow input[name$="[t]"], .mrow input[name$="[u]"] { flex: 1; min-width: 0; }
.mrow .check { margin: 0; white-space: nowrap; }
.mrow-btns { display: flex; gap: 4px; margin-right: auto; }
.mrow-btns .btn { padding: 4px 9px; }
.cats-badge { flex: 1; background: #f5f3ff; border: 1px dashed var(--brand); color: var(--brand-dark); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
#presets .btn, #catPresets .btn { margin: 0 0 6px 6px; }
.admin-main { padding: 24px; }
.admin-content { max-width: 1100px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; }
.stat span { font-size: 13px; color: var(--muted); display: block; }
.stat b { font-size: 22px; }
.stat.ok b { color: var(--green); }
.stat.warn b { color: #b45309; }
.admin-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.help { background: var(--bg); border-radius: 10px; padding: 14px 34px 14px 14px; font-size: 14px; }
code { background: #1e1b2e; color: #a5f3fc; padding: 2px 8px; border-radius: 6px; font-size: 13px; }

/* --- رسپانسیو --- */
@media (max-width: 1000px) {
  .pgrid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .shop-wrap, .cart-wrap, .checkout-wrap, .admin-cols, .pro-wrap { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-wrap { grid-template-columns: 1fr; }
  .sidebar { display: block; }
  .mrow { flex-wrap: wrap; }
  .mrow input[name$="[t]"], .mrow input[name$="[u]"] { flex: 1 1 100%; }
  .mrow-btns { margin-right: 0; }
}
@media (max-width: 640px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .header-in { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .hero-slide { padding: 36px 20px; }
  .hero-slide h1 { font-size: 24px; }
}

/* ===== فاز ۲ و ۳ ===== */
/* دکمه‌های روی کارت محصول */
.pcard-ops { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; opacity: 0; transition: .2s; }
.pcard:hover .pcard-ops { opacity: 1; }
.icon-btn { background: #fff; border: 1px solid var(--line); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.icon-btn:hover { border-color: var(--brand); transform: scale(1.1); }
.wish-form .icon-btn.on { background: #fee2e2; border-color: #fca5a5; }
.wish-form { margin: 0; }
@media (hover: none) { .pcard-ops { opacity: 1; } }

/* مودال نمایش سریع */
.qmodal { display: none; position: fixed; inset: 0; background: rgba(30,27,46,.6); z-index: 100; align-items: center; justify-content: center; padding: 16px; }
.qmodal.open { display: flex; }
.qmodal-box { background: #fff; border-radius: var(--radius); max-width: 760px; width: 100%; padding: 26px; position: relative; max-height: 90vh; overflow: auto; }
.qmodal-x { position: absolute; top: 10px; left: 10px; background: var(--bg); border: none; border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 15px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; }
.quick-grid img { width: 100%; border-radius: 12px; aspect-ratio: 1; object-fit: cover; }

/* بلاگ */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.blog-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); }
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 8px 26px rgba(124,58,237,.15); transition: .2s; }
.blog-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-card div { padding: 14px; }
.blog-card h3 { margin: 0 0 8px; font-size: 16px; }
.blog-card p { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.post h1 { margin-top: 0; }
.post-img { width: 100%; max-height: 380px; object-fit: cover; border-radius: 12px; margin: 10px 0; }
.post-body { line-height: 2.1; }

/* مقایسه */
.cmp-scroll { overflow-x: auto; }
.cmp td, .cmp th { text-align: center; min-width: 180px; vertical-align: top; }
.cmp th { background: var(--bg); color: var(--text); }
.cmp-head img { width: 140px; height: 140px; object-fit: cover; border-radius: 10px; display: block; margin: 0 auto 8px; }

/* ماشین‌حساب + خرید */
.calc-buy { display: flex; gap: 8px; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.calc-buy select { max-width: 340px; }
.meta-line { font-size: 13px; color: var(--brand-dark); background: var(--bg); border-radius: 8px; padding: 2px 8px; margin: 4px 0; display: inline-block; }

/* محصول ابعادی */
.sized-form { background: var(--bg); border-radius: 12px; padding: 16px; margin: 14px 0; }
.sized-total { font-size: 18px; margin: 10px 0; }
.sized-total b { color: var(--brand-dark); }

/* باشگاه مشتریان */
.points-hero { background: linear-gradient(135deg, #7c3aed, #f59e0b); color: #fff; border-radius: var(--radius); padding: 30px; text-align: center; margin-bottom: 16px; }
.points-hero b { font-size: 34px; display: block; }

/* نمودار گزارش */
.chart { display: flex; align-items: end; gap: 3px; height: 220px; background: var(--bg); border-radius: 10px; padding: 12px 12px 4px; direction: ltr; }
.bar { flex: 1; background: linear-gradient(180deg, #a855f7, #7c3aed); border-radius: 4px 4px 0 0; min-width: 6px; position: relative; }
.bar span { position: absolute; top: -20px; width: 100%; text-align: center; font-size: 11px; color: var(--muted); }
.chart-x { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 4px 12px; direction: ltr; }

@media (max-width: 1000px) { .blog-grid { grid-template-columns: 1fr 1fr; } .quick-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }

/* ===== فاز ۴ ===== */
.ltab-head { display: flex; gap: 8px; margin-bottom: 12px; }
.ltab-head button { flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-family: inherit; cursor: pointer; }
.ltab-head button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.ltab-body { display: none; }
.ltab-body.active { display: block; }
.prov-checks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px 12px; background: var(--bg); border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.track-box { background: #ecfdf5; border: 1px solid #6ee7b7; border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
@media (max-width: 640px) { .prov-checks { grid-template-columns: 1fr 1fr; } }

/* فاز ۵: نوار اطلاع‌رسانی، فونت، خبرم‌کن */
.announce-bar{background:linear-gradient(90deg,#7c3aed,#db2777);color:#fff;text-align:center;padding:8px 12px;font-weight:700}
.announce-bar a{color:#fef08a}
.font-opt{display:block!important;border:1px solid #e5e7eb;border-radius:8px;padding:8px 12px;margin:6px 0;cursor:pointer}
.font-opt input{margin-left:8px}
.font-preview h1{font-size:1.6em;margin:0 0 8px}
.notify-box{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;padding:12px;margin:12px 0}
.notify-box .frow{margin-top:8px}

/* فاز ۶: استایل پلاگین‌ها */
.calc-result{background:#f0fdf4;border:2px solid #22c55e;border-radius:10px;padding:14px;margin:14px 0;font-size:1.1em}
.pvideo{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:12px;margin:12px 0}
.pvideo video,.pvideo iframe{border-radius:8px;max-width:100%}

/* ===== v1.9.6: ریسپانسیو سراسری — بدون اسکرول افقی در هیچ دستگاهی ===== */
img, video, iframe { max-width: 100%; }
.post-body img, .tab-body img { height: auto; }
.pvideo iframe { width: 100%; aspect-ratio: 16/9; height: auto; }
/* جدول‌ها: اسکرول افقی داخلی به‌جای شکستن قاب (دسکتاپ بی‌تأثیر) */
.table-scroll { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sec-head, .shop-head { flex-wrap: wrap; gap: 8px; }
/* آیتم‌های گرید اجازه کوچک‌شدن دارند (جلوگیری از بیرون‌زدگی سایدبار/ستون‌ها) */
.admin-wrap > *, .shop-wrap > *, .cart-wrap > *, .checkout-wrap > *, .pro-wrap > *, .admin-cols > * { min-width: 0; }
.toolbar, .ltab-head, .calc-layouts { flex-wrap: wrap; }
.tab-head { overflow-x: auto; }
.tab-head button { white-space: nowrap; }

@media (max-width: 640px) {
  body { font-size: 14px; }
  .container { padding: 0 12px; }
  /* هدر */
  .topbar { font-size: 12px; }
  .topbar-in { flex-wrap: wrap; gap: 2px 10px; }
  .header-in { gap: 10px; }
  .logo { font-size: 18px; }
  .header-actions { flex-wrap: wrap; gap: 6px; }
  .hbtn { padding: 7px 10px; font-size: 13px; }
  /* فرم‌ها */
  .frow > * { flex: 1 1 140px; }
  .form-card, .co-form { padding: 16px; }
  /* محصول */
  .pro-wrap { padding: 16px; }
  .pro-info h1 { font-size: 18px; }
  .buy-row { flex-wrap: wrap; }
  .thumbs img { width: 56px; height: 56px; }
  /* سبد: کارت دوردیفه (عکس+نام+حذف / تعداد+قیمت) */
  .cart-row { grid-template-columns: 60px 1fr auto; }
  .cart-row img { width: 60px; height: 60px; }
  .cart-row > :nth-child(1) { grid-row: 1 / span 2; }
  .cart-row > :nth-child(2) { grid-column: 2 / span 2; }
  .cart-row > :nth-child(3) { grid-column: 2; grid-row: 2; max-width: 90px; }
  .cart-row > :nth-child(4) { grid-column: 3; grid-row: 2; white-space: nowrap; }
  .cart-row > :nth-child(5) { grid-column: 3; grid-row: 1; justify-self: end; }
  .coupon-row .btn { white-space: nowrap; }
  /* صفحات */
  .pagination { flex-wrap: wrap; }
  .result-box { padding: 26px 16px; }
  .card-num { font-size: 19px; letter-spacing: 1px; overflow-wrap: anywhere; }
  .post { padding: 18px 14px; }
  .points-hero { padding: 22px 14px; }
  .features { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
  .empty { padding: 30px 16px; }
  .qmodal-box { padding: 18px 14px; }
  /* مدیریت */
  .admin-main { padding: 14px 10px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { padding: 10px 8px; }
  .help { padding: 12px; }
}
@media (max-width: 400px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pbody { padding: 8px; }
  .pname { font-size: 13px; }
  .hero-slide h1 { font-size: 20px; }
  .hero-slide { padding: 28px 14px; }
}
