/* ========== متغیرهای تم صنعتی ========== */
:root {
    --primary: #0f172a;
    --primary-dark: #020617;
    --accent: red;
    --accent-dark: red;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-secondary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}
body.dark {
    --primary: #1e293b;
    --primary-dark: #0f172a;
    --accent: red;
    --accent-dark: red;
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
}
*{ margin:0; padding:0; box-sizing:border-box; }
body{ font-family:'Vazirmatn',sans-serif; background:var(--bg-body); color:var(--text-primary); direction:rtl; line-height:1.5; transition:0.2s; }
.industrial-screen{ max-width:480px; margin:0 auto; background:var(--bg-body); min-height:100vh; padding-bottom:70px; position:relative; }

/* هدر */
.industrial-header{ background:var(--primary); color:white; padding:12px 16px; box-shadow:var(--shadow-lg); position:sticky; top:0; z-index:100; }
.header-row{ display:flex; align-items:center; gap:12px; }
.logo img, .logo-placeholder{ width:48px; height:48px; border-radius:50%; object-fit:cover; background:var(--accent); display:flex; align-items:center; justify-content:center; }
.logo-placeholder i{ font-size:28px; }
.brand-info{ flex:1; }
.brand-info h1{ font-size:1.2rem; font-weight:600; }
.brand-info p{ font-size:0.7rem; opacity:0.8; }
.cart-icon{ background:var(--accent); border:none; width:44px; height:44px; border-radius:50%; color:white; font-size:1.4rem; cursor:pointer; position:relative; }
.cart-badge{ position:absolute; top:-5px; right:-5px; background:#dc2626; color:white; font-size:10px; width:18px; height:18px; border-radius:50%; display:flex; align-items:center; justify-content:center; }

/* هدر استیکی */
.sticky-header{ position:fixed; top:0; left:0; right:0; max-width:480px; margin:0 auto; background:var(--bg-card); transform:translateY(-100%); transition:0.3s; z-index:99; box-shadow:var(--shadow); border-bottom:1px solid var(--border); }
.sticky-header.show{ transform:translateY(0); }
.sticky-row{ display:flex; justify-content:space-between; align-items:center; padding:8px 16px; }
.sticky-logo{ display:flex; align-items:center; gap:8px; }
.sticky-logo img{ width:36px; height:36px; border-radius:50%; }
.sticky-name{ font-weight:600; }
.sticky-tabs{ display:flex; gap:8px; overflow-x:auto; padding:0 16px 10px; }
.sticky-tab{ background:var(--bg-secondary); border:none; padding:6px 16px; border-radius:30px; font-size:12px; white-space:nowrap; cursor:pointer; }
.sticky-tab.active{ background:var(--accent); color:white; }

/* دکمه سبد خرید در هدر استیکی (اضافه شد) */
.cart-icon-sticky {
    background: var(--accent);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    position: relative;
}

/* انیمیشن تکان خوردن سبد خرید (اضافه شد) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.shake {
    animation: shake 0.3s ease-in-out;
}

/* وضعیت خالی سبد خرید (اضافه شد) */
.empty-cart {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* جستجوی بزرگ */
.hero-search{ padding:20px 16px; background:var(--bg-secondary); margin-bottom:16px; }
.search-container{ display:flex; align-items:center; background:var(--bg-card); border-radius:60px; border:2px solid var(--border); padding:6px 10px; }
.search-container i{ font-size:1.5rem; color:var(--primary-dark); margin-left:8px; }
.search-container input{ flex:1; border:none; padding:12px 0; font-size:1rem; background:transparent; color:var(--text-primary); }
.search-container button{ background:var(--accent); border:none; border-radius:40px; padding:8px 20px; color:white; font-weight:bold; cursor:pointer; }

/* پروموشن بنر */
.promo-banner{ margin:16px; background:linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius:24px; display:flex; align-items:center; justify-content:space-between; padding:16px; color:white; }
.promo-banner.secondary{ background:linear-gradient(135deg, var(--accent), var(--accent-dark)); }
.promo-banner-content{ flex:1; }
.promo-banner h3{ font-size:1.1rem; margin-bottom:6px; }
.promo-banner p{ font-size:0.8rem; opacity:0.9; margin-bottom:12px; }
.promo-banner-btn{ background:white; color:var(--primary); padding:6px 16px; border-radius:30px; text-decoration:none; font-size:0.8rem; font-weight:600; display:inline-block; }
.promo-banner-img{ width:80px; height:80px; object-fit:contain; margin-right:10px; border-radius:12px; }

/* برندها */
.brands-strip{ margin:16px; }
.strip-title{ font-size:0.9rem; font-weight:600; margin-bottom:10px; color:var(--text-secondary); }
.brands-scroll{ display:flex; gap:12px; overflow-x:auto; padding-bottom:5px; }
.brand-chip{ background:var(--bg-card); border:1px solid var(--border); border-radius:40px; padding:8px 18px; white-space:nowrap; cursor:pointer; transition:0.2s; display:flex; align-items:center; gap:6px; }
.brand-chip img{ width:24px; height:24px; border-radius:50%; object-fit:cover; }
.brand-chip.active{ background:var(--accent); color:white; border-color:var(--accent); }

/* دسته‌بندی‌ها به صورت گرید ۳ ستونه */
.categories-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; padding:0 16px 20px; }
.cat-btn{ background:var(--bg-card); border:1px solid var(--border); border-radius:20px; padding:12px 0; display:flex; flex-direction:column; align-items:center; gap:8px; cursor:pointer; transition:0.2s; font-weight:600; }
.cat-btn i{ font-size:1.8rem; color:var(--accent); }
.cat-btn.active{ background:var(--accent); color:white; border-color:var(--accent); }
.cat-btn.active i{ color:white; }

/* محصولات – لیستی عمودی */
.products-header{ display:flex; justify-content:space-between; align-items:baseline; margin:10px 16px; }
.products-list{ margin:0 16px; }
.product-item{ background:var(--bg-card); border-radius:20px; padding:12px; margin-bottom:16px; display:flex; gap:14px; border:1px solid var(--border); position:relative; cursor:pointer; transition:0.2s; }
.product-item:hover{ transform:translateY(-2px); box-shadow:var(--shadow); }
.product-img{ width:90px; height:90px; object-fit:contain; background:var(--bg-secondary); border-radius:12px; }
.product-details{ flex:1; }
.product-title{ font-weight:700; margin-bottom:4px; }
.product-sku{ font-size:11px; color:var(--accent); font-family:monospace; margin-bottom:6px; }
.product-price{ font-weight:700; color:var(--accent); margin-bottom:10px; }
.old-price{ text-decoration:line-through; font-size:0.8rem; color:var(--text-muted); margin-left:6px; }
.add-to-cart-btn{ background:var(--accent); border:none; border-radius:30px; padding:6px 12px; color:white; font-weight:600; display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
.quantity-controls, .qty-controls{ display:flex; align-items:center; gap:8px; background:var(--bg-secondary); border-radius:30px; padding:4px 8px; width:fit-content; }
.qty-btn, .qty-minus, .qty-plus{ background:none; border:none; width:28px; height:28px; border-radius:50%; cursor:pointer; font-size:1.2rem; display:inline-flex; align-items:center; justify-content:center; }
.availability-badge{ position:absolute; top:10px; right:10px; font-size:10px; padding:2px 8px; border-radius:20px; }
.available{ background:#22c55e; color:white; }
.unavailable{ background:#ef4444; color:white; }

/* فوتر */
.industrial-footer{ text-align:center; padding:24px 16px; border-top:1px solid var(--border); margin-top:30px; }
.footer-social a{ font-size:1.8rem; margin:0 10px; color:var(--accent); text-decoration:none; }
.footer-copyright{ margin-top:12px; font-size:12px; color:var(--text-muted); }
.footer-copyright a{ color:var(--text-secondary); text-decoration:none; }

/* مودال محصول */
.product-modal{ position:fixed; inset:0; background:rgba(0,0,0,0.8); z-index:1000; align-items:center; justify-content:center; display:none; }
.modal-content{ background:var(--bg-card); max-width:90%; width:400px; border-radius:28px; padding:20px; position:relative; max-height:90vh; overflow-y:auto; }
.modal-close{ position:absolute; left:15px; top:15px; background:var(--accent); border:none; width:32px; height:32px; border-radius:50%; color:white; font-size:20px; cursor:pointer; }
.modal-image img{ width:100%; border-radius:16px; margin-bottom:16px; }
.modal-description{ margin:16px 0; line-height:1.6; color:var(--text-secondary); }
.share-section{ margin-top:16px; display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.share-btn{ background:var(--bg-secondary); border:none; padding:6px 12px; border-radius:30px; cursor:pointer; text-decoration:none; color:var(--text-primary); display:inline-flex; align-items:center; gap:6px; }

/* دراور سبد خرید */
.drawer-overlay{ position:fixed; inset:0; background:rgba(0,0,0,0.5); opacity:0; visibility:hidden; transition:0.3s; z-index:200; }
.drawer-overlay.active{ opacity:1; visibility:visible; }
.cart-drawer{ position:fixed; bottom:0; left:0; right:0; max-width:480px; margin:0 auto; background:var(--bg-card); border-radius:28px 28px 0 0; transform:translateY(100%); transition:0.3s; z-index:201; max-height:80vh; display:flex; flex-direction:column; }
.cart-drawer.open{ transform:translateY(0); }
.drawer-header{ display:flex; justify-content:space-between; padding:20px; border-bottom:1px solid var(--border); }
.cart-items{ flex:1; overflow-y:auto; padding:16px; }
.cart-item{ display:flex; justify-content:space-between; margin-bottom:16px; border-bottom:1px solid var(--border); padding-bottom:12px; align-items:center; }
.drawer-footer{ padding:20px; border-top:1px solid var(--border); }
.total-line{ display:flex; justify-content:space-between; margin-bottom:16px; font-weight:600; }
.checkout-btn{ width:100%; background:var(--accent); border:none; padding:14px; border-radius:40px; color:white; font-weight:600; cursor:pointer; }

/* بازگشت به بالا */
.back-to-top {
    position: fixed;
    bottom: 80px;
    left: 15px;
    width: 44px;
    height: 44px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    /*display: none;*/
    z-index: 99;
    /* اضافه کردن موارد زیر برای مرکزیت آیکون */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}.empty-state{ text-align:center; padding:60px 20px; color:var(--text-muted); display:none; }

/* صفحه نظرات (اضافه شد) */
.reviews-page{ padding:20px; }
.reviews-header{ background:var(--bg-card); border-radius:24px; padding:20px; margin-bottom:24px; }
.reviews-summary{ display:flex; gap:24px; flex-wrap:wrap; justify-content:center; margin-bottom:16px; }
.avg-stars{ text-align:center; }
.big-rating{ font-size:2.5rem; font-weight:700; display:block; }
.stars span{ color:#fbbf24; font-size:1.2rem; }
.rating-bars{ flex:1; }
.bar-row{ display:flex; align-items:center; gap:12px; margin-bottom:6px; }
.bar{ flex:1; background:var(--bg-secondary); height:8px; border-radius:4px; overflow:hidden; }
.bar-fill{ background:var(--accent); height:100%; border-radius:4px; }
.new-review-btn{ background:var(--accent); border:none; padding:10px 20px; border-radius:40px; color:white; font-weight:600; cursor:pointer; width:100%; margin-top:10px; }
.review-card{ background:var(--bg-card); border-radius:20px; padding:16px; margin-bottom:16px; }
.review-head{ display:flex; justify-content:space-between; margin-bottom:12px; }
.avatar{ width:40px; height:40px; background:var(--primary); color:white; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:bold; }
.review-img{ max-width:100%; max-height:200px; margin-top:10px; border-radius:12px; cursor:pointer; }
.admin-response{ background:rgba(249,115,22,0.1); padding:12px; border-radius:16px; margin-top:10px; border-right:3px solid var(--accent); }
.empty-reviews{ text-align:center; padding:60px; background:var(--bg-card); border-radius:24px; }

/* مودال ثبت نظر */
.review-modal{ position:fixed; inset:0; background:rgba(0,0,0,0.8); z-index:1100; display:none; align-items:center; justify-content:center; }
.modal-inner{ background:var(--bg-card); max-width:90%; width:450px; border-radius:28px; padding:24px; position:relative; max-height:90vh; overflow-y:auto; }
.star-select{ display:flex; flex-direction:row-reverse; justify-content:center; gap:8px; margin-bottom:20px; }
.star-select input{ display:none; }
.star-select label{ font-size:2rem; color:var(--text-muted); cursor:pointer; transition:0.2s; }
.star-select input:checked ~ label, .star-select label:hover, .star-select label:hover ~ label{ color:#fbbf24; }
.upload-area{ margin:15px 0; text-align:center; }
.upload-area button{ background:var(--bg-secondary); border:1px dashed var(--accent); padding:8px 16px; border-radius:30px; cursor:pointer; }
#imagePreview img{ max-width:100px; margin-top:10px; }
.flex-buttons{ display:flex; gap:10px; justify-content:center; margin:15px 0; }
.flex-buttons button{ background:var(--accent); border:none; padding:8px 20px; border-radius:30px; color:white; cursor:pointer; }
#reviewMessage .error{ color:#ef4444; display:block; margin-top:10px; }
#reviewMessage .success{ color:#22c55e; }

/* لایت‌باکس تصاویر */
.image-lightbox{ position:fixed; inset:0; background:rgba(0,0,0,0.9); z-index:1200; display:none; align-items:center; justify-content:center; cursor:pointer; }
.image-lightbox img{ max-width:90%; max-height:90%; border-radius:16px; }

/* صفحه درباره ما */
.about-hero{ height:250px; background-size:cover; display:flex; align-items:center; justify-content:center; text-align:center; color:white; }
.about-hero-text{ background:rgba(0,0,0,0.6); padding:20px; border-radius:20px; width:80%; }
.business-tags{ display:flex; gap:10px; justify-content:center; margin-bottom:30px; flex-wrap:wrap; }
.badge-primary{ background:var(--primary); color:white; padding:5px 15px; border-radius:30px; }
.badge-secondary{ background:var(--bg-secondary); color:var(--text-primary); padding:5px 15px; border-radius:30px; border:1px solid var(--border); }
.story-card, .features-glass, .stats-glass, .highlights-section, .hours-card, .contact-info-card{ background:var(--bg-card); border-radius:24px; padding:20px; margin-bottom:24px; }
.stats-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; margin-top:16px; }
.stat-glass{ text-align:center; background:var(--bg-secondary); border-radius:20px; padding:16px; }
.stat-num{ font-size:2rem; font-weight:700; display:block; color:var(--accent); }
.highlights-list{ display:flex; flex-direction:column; gap:12px; }
.highlight-item{ display:flex; align-items:center; gap:10px; padding:8px 0; }
.highlight-item i{ color:var(--accent); font-size:1.2rem; }
.hour-row{ display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--border); }
.hour-row.today{ background:rgba(249,115,22,0.1); border-radius:12px; padding:10px; }
.closed{ color:#ef4444; }
.open-hours{ color:var(--accent); }
.contact-map-row{ display:flex; flex-direction:column; gap:24px; }
.map-container iframe{ width:100%; height:250px; border-radius:24px; }
.social-icons{ display:flex; gap:16px; justify-content:center; margin-top:16px; flex-wrap:wrap; }
.social-icons a{ background:var(--bg-secondary); padding:8px 20px; border-radius:40px; text-decoration:none; color:var(--text-primary); display:inline-flex; align-items:center; gap:8px; }

/* پرلودر صنعتی */
#preloader{ position:fixed; inset:0; background:var(--primary-dark); z-index:2000; display:flex; align-items:center; justify-content:center; transition:0.5s; }
.loader-box{ text-align:center; }
.loader-logo img{ width:80px; height:80px; border-radius:50%; animation:pulse 1s infinite; }
.loader-spinner{ display:flex; gap:8px; justify-content:center; margin-bottom:20px; }
.gear{ width:40px; height:40px; border:4px solid var(--accent); border-radius:50%; border-top-color:transparent; animation:spin 1s linear infinite; }
.loader-title{ color:white; font-size:1.5rem; }
@keyframes spin{ to{ transform:rotate(360deg); } }
@keyframes pulse{ 0%{ transform:scale(1); opacity:0.7;} 50%{ transform:scale(1.1); opacity:1;} 100%{ transform:scale(1); opacity:0.7;} }
#preloader.hide{ opacity:0; visibility:hidden; }

/* نوار پایین */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 90;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
}
.nav-item.active {
    color: var(--accent);
}
.nav-item i {
    font-size: 22px;
}

/* رسپانسیو */
@media (max-width:480px){ .categories-grid{ grid-template-columns:repeat(3,1fr); gap:8px; } .cat-btn{ padding:8px 0; } .cat-btn i{ font-size:1.4rem; } }


.details-btn {
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 30px;
    padding: 6px 12px;
    color: var(--accent);
    cursor: pointer;
    transition: 0.2s;
}
.details-btn:hover {
    background: var(--accent);
    color: white;
}
/* حذف اسکرول بار افقی از sticky-tabs و brands-scroll */
.sticky-tabs,
.brands-scroll {
    overflow-x: auto;
    scrollbar-width: none; /* فایرفاکس */
    -ms-overflow-style: none; /* IE و Edge قدیمی */
}
.sticky-tabs::-webkit-scrollbar,
.brands-scroll::-webkit-scrollbar {
    display: none; /* کروم، سافاری، اپرا */
}
.modal-close {
    position: absolute;
    left: 15px;
    top: 15px;
    background: var(--accent);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}
.modal-close:hover {
    background: var(--accent-dark);
    transform: scale(1.05);
}
/* ========== استایل مودال ثبت نظر ========== */
.review-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-inner {
    background: var(--bg-card);
    max-width: 90%;
    width: 450px;
    border-radius: 28px;
    padding: 24px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

/* دکمه بستن داخل مودال ثبت نظر (همان کلاس modal-close استفاده شده) */
.review-modal .modal-close {
    left: auto;
    right: 15px;
    background: #ef4444;
}

/* مرحله‌های فرم */
.step {
    margin-top: 20px;
}

.star-select {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}
.star-select input {
    display: none;
}
.star-select label {
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
}
.star-select input:checked ~ label,
.star-select label:hover,
.star-select label:hover ~ label {
    color: #fbbf24;
}

/* فیلدها و تکست‌اریا */
.modal-inner input[type="text"],
.modal-inner input[type="tel"],
.modal-inner textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 16px;
    border: 2px solid var(--border);
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: inherit;
    margin-bottom: 15px;
    direction: rtl;
}
.modal-inner textarea {
    resize: vertical;
}

/* آپلود عکس */
.upload-area {
    text-align: center;
    margin: 15px 0;
}
.upload-area button {
    background: var(--bg-secondary);
    border: 1px dashed var(--accent);
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    color: var(--text-primary);
}
#imagePreview {
    margin-top: 10px;
}
#imagePreview img {
    max-width: 100px;
    border-radius: 12px;
    border: 2px solid var(--accent);
}

/* دکمه‌های مرحله */
.next-btn, .flex-buttons button {
    background: var(--accent);
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin: 5px;
}
.flex-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}
#resendBtn {
    background: transparent;
    color: var(--accent);
    text-decoration: underline;
}

/* پیام‌های خطا و موفقیت */
.error {
    color: #ef4444;
    display: block;
    margin-top: 10px;
}
.success {
    color: #22c55e;
}
/* استایل دکمه بستن در دراور سبد خرید */
#closeCartBtn {
    background: transparent;
    border: none;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}
#closeCartBtn:hover {
    background: var(--bg-secondary);
    color: var(--accent);
    transform: rotate(90deg);
}
.copyright-footer {
    text-align: center;
    padding: 15px 10px;
    background: rgba(0,0,0,0.03);
    border-top: 1px solid rgba(0,0,0,0.1);
    font-size: 0.85rem;
    color: #555;
    /*margin-top: 20px;*/
    margin-bottom: 70px;
}
.copyright-footer a {
    color: var(--accent, #d32f2f);
    text-decoration: none;
    font-weight: 500;
}
.copyright-footer a:hover {
    text-decoration: underline;
}
