/* فونت از fontcdn (header.php) بارگذاری می‌شود — اینجا import نمی‌شود */

:root {
  --deep: #0a2342; --mid: #1a4a7a; --light: #2980b9;
  --soft: #5dade2; --pale: #d6eaf8; --sand: #f7f3ec;
  --sand2: #ede8df; --gold: #c9973a; --gold2: #f0c96a;
  --green: #1a7a5e; --red: #c0392b;
  --text: #1a1a2e; --text2: #4a5568; --text3: #8899aa;
  --white: #fff; --radius: 16px; --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(10,35,66,.10);
  --shadow-lg: 0 12px 48px rgba(10,35,66,.18);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Vazirmatn', sans-serif;
  direction: rtl;
  background: var(--sand);
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden; /* جلوگیری از اسکرول افقی در موبایل */
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* NAVBAR */
.navbar { background: rgba(10,35,66,.97); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 999; box-shadow: 0 2px 20px rgba(10,35,66,.3); }
.navbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 17px; font-weight: 700; }
.brand-icon { width: 38px; height: 38px; background: linear-gradient(135deg, var(--soft), var(--gold)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.nav-links a { color: rgba(255,255,255,.8); font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: var(--gold2); }
.nav-cta { background: var(--gold); color: var(--deep) !important; padding: 7px 18px; border-radius: 40px; font-weight: 700 !important; transition: all .2s !important; }
.nav-cta:hover { background: var(--gold2) !important; transform: translateY(-1px); }
.nav-user { color: rgba(255,255,255,.8); font-size: 13px; display: flex; align-items: center; gap: 8px; }

/* SLIDER */
.slider-wrap { position: relative; overflow: hidden; background: var(--deep); width: 100%; direction: ltr; }
.slider-track { display: flex; direction: ltr; transition: transform .6s cubic-bezier(.4,0,.2,1); will-change: transform; width: 100%; }
.slide { min-width: 0; width: 100%; position: relative; padding: 6rem 2rem 5rem; flex-shrink: 0; direction: rtl; }
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.slide-overlay { position: absolute; inset: 0; }
.slide-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; text-align: center; }
.slide-badge { display: inline-block; background: rgba(201,151,58,.25); border: 1px solid rgba(201,151,58,.6); color: var(--gold2); padding: 5px 18px; border-radius: 40px; font-size: 13px; margin-bottom: 1.2rem; }
.slide h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; color: #fff; line-height: 1.35; margin-bottom: 1rem; }
.slide h2 span { color: var(--gold2); }
.slide p { font-size: 1rem; color: rgba(255,255,255,.82); max-width: 520px; margin: 0 auto 2rem; }
.slider-wave { position: absolute; bottom: -1px; left: 0; right: 0; z-index: 2; }
.slider-controls { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.slider-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); border: none; cursor: pointer; transition: all .3s; }
.slider-dot.active { background: var(--gold); width: 28px; border-radius: 5px; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(255,255,255,.15); border: none; color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: all .2s; backdrop-filter: blur(4px); }
.slider-arrow:hover { background: rgba(255,255,255,.3); }
.slider-arrow.prev { right: 1.5rem; }
.slider-arrow.next { left: 1.5rem; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 32px; border-radius: 40px; font-size: 15px; font-weight: 700; cursor: pointer; border: none; transition: all .25s; font-family: 'Vazirmatn', sans-serif; text-decoration: none; }
.btn-primary { background: var(--gold); color: var(--deep); box-shadow: 0 4px 20px rgba(201,151,58,.4); }
.btn-primary:hover { background: var(--gold2); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201,151,58,.5); }
.btn-ocean { background: var(--mid); color: #fff; }
.btn-ocean:hover { background: var(--deep); transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn-sm { padding: 8px 20px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* SECTION */
section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-label { display: inline-block; color: var(--light); font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: .6rem; }
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: var(--deep); margin-bottom: .8rem; }
.section-sub { color: var(--text2); max-width: 540px; margin: 0 auto; font-size: 15px; }

/* FEATURES */
.features-section { background: var(--white); padding: 3rem 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.feature-card { background: var(--sand); border-radius: var(--radius); padding: 1.75rem 1.5rem; text-align: center; border: 1px solid var(--sand2); transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease; }
.feature-card:hover { transform: translateY(-8px) scale(1.025); box-shadow: var(--shadow-lg); }
.feature-icon { width: 60px; height: 60px; background: linear-gradient(135deg, var(--pale), var(--soft)); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 26px; margin: 0 auto 1rem; }
.feature-card h3 { font-size: 15px; font-weight: 700; color: var(--deep); margin-bottom: .4rem; }
.feature-card p { font-size: 13px; color: var(--text2); }

/* PRODUCTS */
.products-section { background: var(--white); }
.products-carousel-wrap { position: relative; }
.products-carousel { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 320px)); gap: 28px; justify-content: center; }
.carousel-dots { display: none; justify-content: center; gap: 8px; margin-top: 1.25rem; }
.products-carousel-badge { display: none; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--mid); background: transparent; cursor: pointer; padding: 0; transition: all .2s; }
.carousel-dot.active { background: var(--mid); border-color: var(--mid); transform: scale(1.3); }

@media (max-width: 700px) {
  /* بدون قاب/پس‌زمینه دور کاروسل — دقیقاً مثل «پیشنهاد ویژه»، فقط اسکرول ساده */
  .products-carousel-wrap { width: 100%; }
  .products-carousel-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--mid); margin-bottom: .85rem; padding: 0 6vw; }
  /* توجه: عمداً هیچ direction ای اینجا ست نمی‌شود — کانتینر همون جهت
     طبیعی صفحه (rtl) رو می‌گیره. مدیریت اسکرول به‌جای فرمول‌های دستی
     scrollLeft، در main.js با IntersectionObserver/scrollIntoView انجام
     می‌شه که مستقل از جهت و مرورگره. */
  .products-carousel { display: flex; overflow-x: auto; overflow-y: hidden; gap: 16px; padding: .5rem 6vw 1rem 6vw; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-behavior: smooth; box-sizing: border-box; justify-content: flex-start; }
  .products-carousel::-webkit-scrollbar { display: none; }
  .carousel-item { flex: 0 0 82vw; max-width: 320px; width: 82vw; box-sizing: border-box; scroll-snap-align: start; scroll-snap-stop: always; }
  .carousel-dots { display: flex; }
}

.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--sand2); transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-8px) scale(1.025); box-shadow: var(--shadow-lg); }
.product-thumb { height: 220px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.product-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 5rem; background: linear-gradient(135deg, var(--mid), var(--soft)); transition: transform .5s cubic-bezier(.16,1,.3,1); }
.product-card:hover .product-thumb img,
.product-card:hover .product-thumb-placeholder { transform: scale(1.12); }
.product-badge { position: absolute; top: 12px; right: 12px; background: var(--gold); color: var(--deep); font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 20px; z-index: 1; }
.product-wishlist { position: absolute; top: 12px; left: 12px; width: 34px; height: 34px; background: rgba(255,255,255,.9); border: none; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all .2s; z-index: 1; }
.product-wishlist.active { background: #ffe5e5; color: var(--red); }
.product-wishlist:hover { transform: scale(1.15); }
.product-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.product-cat { font-size: 11px; font-weight: 700; color: var(--light); letter-spacing: 1px; margin-bottom: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-title { font-size: 17px; font-weight: 700; color: var(--deep); margin-bottom: .6rem; line-height: 1.5; }
.product-desc { color: var(--text2); font-size: 13px; line-height: 1.7; flex: 1; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { display: flex; gap: .75rem; font-size: 12px; color: var(--text3); margin-bottom: 1rem; }
.product-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--sand2); }
.product-price { font-size: 19px; font-weight: 800; color: var(--deep); }
.product-price small { font-size: 12px; font-weight: 400; color: var(--text3); }

/* ABOUT */
.about-section { background: linear-gradient(135deg, var(--deep), var(--mid)); color: #fff; padding: 5rem 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-list { list-style: none; display: flex; flex-direction: column; gap: .9rem; margin-top: 1.5rem; }
.about-list li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: rgba(255,255,255,.85); }
.about-list li::before { content: '🌊'; font-size: 16px; }

/* TESTIMONIALS */
.test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.test-card { background: var(--sand); border-radius: var(--radius); padding: 1.75rem; border: 1px solid var(--sand2); transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease; }
.test-card:hover { transform: translateY(-8px) scale(1.025); box-shadow: var(--shadow-lg); }
.stars { color: var(--gold); font-size: 17px; margin-bottom: .8rem; }
.test-text { color: var(--text2); font-size: 14px; line-height: 1.8; margin-bottom: 1.2rem; font-style: italic; }
.test-author { display: flex; align-items: center; gap: 10px; }
.author-av { width: 40px; height: 40px; background: linear-gradient(135deg, var(--mid), var(--soft)); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 15px; }
.author-name { font-weight: 700; font-size: 14px; color: var(--deep); }
.author-role { font-size: 12px; color: var(--text3); }

/* PRODUCT PAGE */
.product-detail-wrap { max-width: 960px; margin: 0 auto; }
.product-detail-hero { border-radius: var(--radius); overflow: hidden; height: 320px; position: relative; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--deep), var(--soft)); }
.product-detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-hero-placeholder { font-size: 6rem; }
.video-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 1.25rem 0; }
.video-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--sand); border-radius: var(--radius-sm); font-size: 13px; color: var(--text2); }
.video-num { width: 28px; height: 28px; background: var(--mid); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.purchase-box { background: var(--sand); border: 2px solid var(--pale); border-radius: var(--radius); padding: 2rem; text-align: center; margin-top: 2rem; }
.purchase-price { font-size: 2.4rem; font-weight: 800; color: var(--deep); }

/* CART */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px; border-bottom: 1px solid var(--sand2); text-align: right; font-size: 14px; }
.cart-table th { font-weight: 700; color: var(--text2); font-size: 13px; }
.cart-summary { background: var(--sand); border-radius: var(--radius); padding: 1.75rem; }

/* CHECKOUT / FORMS */
.form-card { background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--deep); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--sand2); border-radius: var(--radius-sm); font-family: 'Vazirmatn', sans-serif; font-size: 14px; direction: rtl; transition: border-color .2s; background: var(--white); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--soft); box-shadow: 0 0 0 3px rgba(93,173,226,.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.captcha-box { display: flex; align-items: center; gap: 12px; background: var(--sand); padding: 12px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--sand2); }
.captcha-question { font-weight: 700; font-size: 15px; color: var(--deep); }
.captcha-box input { flex: 1; max-width: 80px; }

/* INVOICE */
.invoice-header { background: linear-gradient(135deg, var(--deep), var(--mid)); color: #fff; padding: 2.5rem; border-radius: var(--radius) var(--radius) 0 0; text-align: center; }
.invoice-body { background: var(--white); padding: 2rem; border-radius: 0 0 var(--radius) var(--radius); border: 1px solid var(--sand2); border-top: none; }
.invoice-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.invoice-table th, .invoice-table td { padding: 12px; text-align: right; font-size: 14px; border-bottom: 1px solid var(--sand2); }
.invoice-table th { background: var(--sand); font-weight: 700; font-size: 13px; }
.invoice-total { font-size: 1.6rem; font-weight: 800; color: var(--deep); }

/* DOWNLOAD */
.download-link-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: var(--sand); border-radius: var(--radius-sm); margin-bottom: 8px; transition: background .2s; text-decoration: none; }
.download-link-item:hover { background: var(--pale); }
.download-link-num { width: 32px; height: 32px; background: var(--mid); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.download-link-name { flex: 1; font-size: 14px; color: var(--text); font-weight: 500; }
.download-link-btn { background: var(--light); color: #fff; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; }

/* AUTH */
.auth-wrap { min-height: 100vh; background: linear-gradient(135deg, var(--deep), var(--mid)); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { background: #fff; border-radius: 20px; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-tabs { display: flex; border-bottom: 2px solid var(--sand2); margin-bottom: 1.5rem; }
.auth-tab { flex: 1; padding: 10px; text-align: center; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text3); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.auth-tab.active { color: var(--mid); border-color: var(--mid); }

/* ADMIN */
.admin-body { min-height: 100vh; background: #f0f4f8; font-family: 'Vazirmatn', sans-serif; direction: rtl; }
.admin-sidebar { width: 245px; background: var(--deep); position: fixed; top: 0; right: 0; bottom: 0; padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; z-index: 200; }
.admin-logo { color: #fff; font-size: 15px; font-weight: 700; padding: .75rem 1rem; margin-bottom: .75rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-nav-item { display: flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: var(--radius-sm); color: rgba(255,255,255,.7); font-size: 13px; cursor: pointer; transition: all .2s; text-decoration: none; }
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(255,255,255,.12); color: #fff; }
.admin-main { margin-right: 245px; padding: 2rem; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.75rem; gap: 10px; }
.admin-page-title { font-size: 20px; font-weight: 800; color: var(--deep); }
.admin-sidebar-toggle { display: none; background: var(--deep); color: #fff; border: none; border-radius: 8px; width: 40px; height: 40px; font-size: 20px; cursor: pointer; align-items: center; justify-content: center; flex-shrink: 0; }
.admin-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(10,35,66,.45); z-index: 150; }
.admin-sidebar-overlay.open { display: block; }
.admin-card { background: #fff; border-radius: var(--radius); padding: 1.75rem; box-shadow: 0 2px 12px rgba(0,0,0,.06); margin-bottom: 1.5rem; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 1.75rem; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 1.4rem; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.stat-num { font-size: 1.9rem; font-weight: 800; color: var(--deep); }
.stat-label { font-size: 12px; color: var(--text3); margin-top: 3px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.admin-table th { text-align: right; padding: 10px 12px; font-size: 12px; font-weight: 700; color: var(--text3); border-bottom: 1px solid var(--sand2); white-space: nowrap; }
.admin-table td { padding: 12px; font-size: 13px; border-bottom: 1px solid var(--sand2); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--sand); }

/* BADGES & ALERTS */
.badge { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 700; }
.badge-active { background: #d4edda; color: #155724; }
.badge-inactive { background: #f8d7da; color: #721c24; }
.badge-paid { background: #d4edda; color: #155724; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-new { background: #cce5ff; color: #004085; }
.badge-hot { background: #f8d7da; color: #721c24; }
.badge-featured { background: #fff3cd; color: #856404; }
.badge-notfeatured { background: #f1f1f1; color: #8a8a8a; }
.alert { padding: 12px 18px; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: var(--pale); color: var(--deep); border: 1px solid #b8d4ea; }

/* FOOTER */
footer { background: var(--deep); color: rgba(255,255,255,.7); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }
footer h4 { color: #fff; font-size: 15px; margin-bottom: .9rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,.6); transition: color .2s; }
.footer-links a:hover { color: var(--gold2); }
.footer-bottom { padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.social-links { display: flex; gap: 10px; }
.social-link { width: 34px; height: 34px; background: rgba(255,255,255,.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; transition: background .2s; text-decoration: none; }
.social-link:hover { background: rgba(255,255,255,.2); }

/* PAGE HEADER */
.page-header { background: linear-gradient(135deg, var(--deep), var(--mid)); color: #fff; padding: 3rem 0 2rem; text-align: center; }
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.page-header p { color: rgba(255,255,255,.75); font-size: 15px; }
.breadcrumb { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.6); margin-top: .75rem; }
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb span { color: rgba(255,255,255,.4); }

/* ADMIN FORM */
.video-row { display: grid; grid-template-columns: 2.5fr 2.5fr 1fr auto; gap: 8px; align-items: start; margin-bottom: 8px; }
@media (max-width: 700px) {
  .video-row { grid-template-columns: 1fr !important; gap: 6px !important; background: var(--sand); border-radius: 8px; padding: 10px; margin-bottom: 10px !important; }
  .video-row select, .video-row input { width: 100%; box-sizing: border-box; }
  .video-row .btn-remove { width: 100%; margin-top: 2px; }
}
.video-row input { padding: 9px 12px; border: 1.5px solid var(--sand2); border-radius: 8px; font-family: 'Vazirmatn', sans-serif; font-size: 13px; direction: rtl; width: 100%; }
.btn-add-video { background: var(--pale); border: 1.5px dashed var(--soft); color: var(--deep); padding: 10px; border-radius: 8px; cursor: pointer; font-family: 'Vazirmatn', sans-serif; font-size: 13px; width: 100%; margin-top: 6px; font-weight: 600; }
.btn-remove { background: #fde8e8; border: none; color: #c0392b; padding: 9px 11px; border-radius: 8px; cursor: pointer; font-size: 12px; }
.img-preview { width: 80px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--sand2); }
.slide-editor-row { background: var(--sand); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: .75rem; border: 1px solid var(--sand2); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-sidebar { transform: translateX(100%); transition: transform .3s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-right: 0; padding: 1rem; }
  .admin-sidebar-toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .admin-topbar { flex-wrap: wrap; gap: 8px; }
  .admin-page-title { font-size: 16px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-card { padding: 1.1rem; }
  .admin-date-badge { display: none; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .slide { padding: 4rem 1rem 4rem; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  section { padding: 3rem 0; }
  .admin-card { padding: .9rem; }
  #pushToggleBtn span { display: none; }
}

/* SCROLL REVEAL ANIMATIONS */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); will-change: opacity, transform; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-60px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(60px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(.92); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal-scale.visible { opacity: 1; transform: scale(1); }
.reveal-stagger > * { opacity: 0; transform: translateY(36px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: .15s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: .25s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: .35s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: .45s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: .55s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-stagger > *, .featured-card {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* PRODUCT MEDIA GALLERY */
.media-gallery { display: flex; flex-direction: column; gap: 10px; }
.media-main { border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, var(--deep), var(--soft)); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; position: relative; }
.media-main img, .media-main video { width: 100%; height: 100%; object-fit: contain; display: block; }
.media-main-placeholder { font-size: 6rem; }
.media-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.media-thumb { flex-shrink: 0; width: 72px; height: 54px; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; opacity: .7; transition: all .25s; background: var(--sand); }
.media-thumb:hover { opacity: 1; transform: scale(1.08); }
.media-thumb.active { border-color: var(--gold); opacity: 1; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-thumb-icon { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; background: var(--pale); }
/* product detail layout */
.product-detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 700px) {
  .product-detail-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .product-detail-grid .reveal-right { position: static !important; top: auto !important; }
  .purchase-price { font-size: 1.6rem !important; }
  .media-main { aspect-ratio: 4/3; }
  .product-detail-wrap { padding: 0 .25rem; }
}
.media-play-badge { position: absolute; top: 8px; left: 8px; background: rgba(10,35,66,.7); color: #fff; font-size: 11px; padding: 3px 9px; border-radius: 20px; display: flex; align-items: center; gap: 4px; }

/* RICH DESCRIPTION CONTENT */
.rich-content { font-size: 15px; line-height: 1.95; color: var(--text2); }
.rich-content p { margin-bottom: 1rem; }
.rich-content img, .rich-content video { max-width: 100%; border-radius: var(--radius-sm); margin: 1rem 0; display: block; }
.rich-content h2, .rich-content h3 { color: var(--deep); margin: 1.5rem 0 .75rem; font-weight: 700; }
.rich-content ul, .rich-content ol { margin: 0 0 1rem 1.5rem; }
.rich-content blockquote { border-right: 3px solid var(--gold); padding-right: 1rem; color: var(--text2); font-style: italic; margin: 1rem 0; }

/* FEATURED PRODUCTS CAROUSEL */
.featured-carousel-wrap { background: var(--white); padding: 2.5rem 0 3rem; width: 100%; }
/* توجه: مثل products-carousel، اینجا هم دیگه direction دستی ست نمی‌شه —
   کانتینر جهت طبیعی rtl صفحه رو می‌گیره و اسکرول با scrollIntoView در
   main.js انجام می‌شه (نه فرمول دستی scrollLeft) تا مستقل از مرورگر باشه. */
.featured-carousel-track { display: flex; gap: 16px; overflow-x: auto; padding: .5rem 1.5rem 1rem; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding-inline-start: 1.5rem; justify-content: center; box-sizing: border-box; }
.featured-carousel-track::-webkit-scrollbar { display: none; }
.featured-card { flex: 0 0 240px; scroll-snap-align: start; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--sand2); transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease, opacity .6s ease; text-decoration: none; display: block; opacity: 0; transform: translateY(24px); box-sizing: border-box; }
.featured-card.visible { opacity: 1; transform: translateY(0); }
.featured-card:hover { transform: translateY(-6px) scale(1.04); box-shadow: var(--shadow-lg); }
.featured-thumb { height: 140px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--mid), var(--soft)); }
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.featured-card:hover .featured-thumb img { transform: scale(1.12); }
.featured-thumb-placeholder { font-size: 2.5rem; }
.featured-body { padding: .9rem 1rem; }
.featured-title { font-size: 13.5px; font-weight: 700; color: var(--deep); margin-bottom: .3rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.featured-price { font-size: 13px; font-weight: 700; color: var(--light); }

@media (max-width: 700px) {
  .featured-carousel-track { padding: .5rem 6vw 1rem 6vw; gap: 16px; scroll-snap-type: x mandatory; justify-content: flex-start; }
  .featured-card { flex: 0 0 88vw; scroll-snap-align: center; }
  .featured-thumb { height: 200px; }
}

/* PRODUCTS GRID (list pages) */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }

/* HERO SLIDER (product page / page.php) */
.hero-slider { position: relative; overflow: hidden; background: var(--deep); }
/* hero-slider اینجا نباید display:none بزند چون slider از translateX استفاده میکند */
.hero-slider .slide { min-height: 320px; padding: 4rem 2rem; align-items: center; justify-content: center; background-size: cover; background-position: center; }
.hero-slider .slide-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.hero-slider .slide-overlay .container { text-align: center; color: #fff; position: relative; z-index: 1; }
.slide-title { font-size: clamp(1.5rem,3.5vw,2.4rem); font-weight: 800; color: #fff; margin-bottom: .75rem; line-height: 1.35; }
.slide-sub { font-size: 15px; color: rgba(255,255,255,.82); max-width: 520px; margin: 0 auto 1.5rem; }
.slider-prev, .slider-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; background: rgba(255,255,255,.15); border: none; color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 22px; display: flex; align-items: center; justify-content: center; transition: background .2s; backdrop-filter: blur(4px); }
.slider-prev:hover, .slider-next:hover { background: rgba(255,255,255,.3); }
.slider-prev { right: 1.5rem; }
.slider-next { left: 1.5rem; }

/* PAGE SLIDER JS */
/* slider animation disabled for prefers-reduced-motion */ 

/* =====================================================
   اصلاحات موبایل — v17
   ===================================================== */

/* سبد خرید: در موبایل ستون‌ها روی هم بچینه */
@media (max-width: 768px) {
  /* cart.php: grid دو ستونه → یک ستون */
  .container > div[style*="grid-template-columns:1.6fr"] {
    display: block !important;
  }
  .cart-summary {
    margin-top: 1.5rem;
  }
  /* جدول سبد خرید — سربرگ‌ها پنهان، سلول‌ها block */
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
    display: block;
    width: 100%;
  }
  .cart-table tr {
    margin-bottom: 1rem;
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--sand2);
    padding: .75rem;
  }
  .cart-table td { border: none; padding: 6px 4px; }
  .cart-table td[data-label]:before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 12px;
    color: var(--text3);
    margin-left: 6px;
  }

  /* checkout.php: باکس سفارش */
  .container[style*="max-width:800px"] > div[style*="display:flex"] {
    flex-direction: column !important;
    gap: .75rem !important;
  }

  /* form-card padding کمتر */
  .form-card { padding: 1.25rem; }

  /* دکمه پرداخت — فونت کوچکتر */
  .btn-block { font-size: 14px !important; padding: 13px !important; }

  /* captcha-box در موبایل */
  .captcha-box { flex-wrap: wrap; }
}

/* cart.php خلاصه سبد در موبایل - stack */
@media (max-width: 600px) {
  .cart-table th, .cart-table td { padding: 10px 8px; font-size: 13px; }
  .purchase-box { padding: 1.25rem; }
}

/* cart-grid: دو ستون در دسکتاپ، یک ستون در موبایل */
@media (max-width: 768px) {
  .cart-grid {
    grid-template-columns: 1fr !important;
  }
}

/* برای متن‌هایی که فقط برای گوگل/screen reader لازمن ولی نباید ظاهر سایت رو به‌هم بزنن */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
