/* ======================= Global Styles & Variables ======================= */
/* ======================= Global Styles & Variables ======================= */
:root {
    --dark-gray: #2e2e2e;          
    --light-gray: #dfe4ea;          
    --white: #ffffff;               
    --accent-color-primary: #2471a3; 
    --text-color: #2c2c2c;          
    --header-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    --border-radius-soft: 12px;
    --border-radius-pill: 50px;
    --gradient: linear-gradient(135deg, var(--accent-color-primary), #1c4f7e);
}


* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

/* ======================= Scroll Animations ======================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ======================= Header Styles (ساختار نهایی با تراز کاملاً متعادل) ======================= */
.site-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* ۱. استفاده از Flexbox با یک ترفند خاص برای وسط‌چین کردن */
.header-content {
    display: flex;
    justify-content: space-between; /* این دفعه به این نیاز داریم */
    align-items: center;
}

/* ۲. لوگو و آیکون‌ها را در یک گروه قرار می‌دهیم (مهم) */
.logo, .header-actions {
    /* به هر دو طرف یک عرض پایه می‌دهیم تا تعادل ایجاد شود */
    /* عرضی را انتخاب کنید که کمی از بزرگترین آیتم (لوگو) بیشتر باشد */
    flex-basis: 200px; /* این عدد را می‌توانی کمی تغییر دهی */
}

/* ۳. لوگو را در گروه خودش به سمت راست می‌چسبانیم */
.logo {
    display: flex;
    justify-content: flex-start; /* Start for RTL */
}
.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark-gray);
    white-space: nowrap;
}

/* ۴. آیکون‌ها را در گروه خودشان به سمت چپ می‌چسبانیم */
.header-actions {
    display: flex;
    justify-content: flex-end; /* End for RTL */
    align-items: center;
    gap: 25px;
}
.header-actions a {
    font-size: 1.2rem;
}
.header-actions a:hover {
    color: var(--accent-color-primary);
    transform: scale(1.1);
}

/* ۵. منوی وسط بدون تغییر باقی می‌ماند */
.main-nav ul {
    display: flex;
    gap: 35px;
}
.main-nav a {
    font-size: 1rem;
    font-weight: 500;
    padding-bottom: 5px;
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}
.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--dark-gray);
}

/* بخش موبایل بدون تغییر */
.mobile-nav-actions { display: none; }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--dark-gray);
    cursor: pointer;
    z-index: 1010;
}

/* Other sections... (The CSS from before remains mostly the same, only responsive part changes significantly) */
/* The following is the rest of the CSS, with updated responsive section */

.hero { position: relative; height: 90vh; color: var(--white); display: flex; align-items: center; justify-content: center; text-align: center; background-image: url('https://images.unsplash.com/photo-1563729784474-d77dbb933a9e?auto=format&fit=crop&w=1600&q=80'); background-size: cover; background-position: center; background-attachment: fixed; }
.hero-overlay { position: absolute; inset: 0; background-color: rgba(44, 62, 80, 0.65); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-content h1 { font-size: 4rem; font-weight: 800; margin-bottom: 20px; text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); }
.hero-content p { font-size: 1.3rem; font-weight: 300; margin-bottom: 40px; opacity: 0.9; }
.wavy-divider { position: absolute; bottom: -1px; left: 0; width: 100%; overflow: hidden; line-height: 0; z-index: 3; }
.wavy-divider svg { position: relative; display: block; width: 100%; height: 80px; }
.wavy-divider path { fill: var(--light-gray); }
.cta-button, .cta-button-light { padding: 15px 35px; border-radius: var(--border-radius-pill); font-size: 1.1rem; font-weight: 700; transition: all 0.4s ease; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.cta-button { background: var(--gradient); color: var(--white); box-shadow: 0 8px 15px rgba(52, 152, 219, 0.3); }
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 12px 20px rgba(52, 152, 219, 0.4); }
.cta-button i { transition: transform 0.3s ease; }
.cta-button:hover i { transform: translateX(-5px); }
.section-padding { padding: 100px 0; }
.section-title { text-align: center; font-size: 2.5rem; font-weight: 800; color: var(--dark-gray); margin-bottom: 60px; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background: var(--gradient); border-radius: 2px; }
.features-bar { padding: 60px 0; background-color: var(--light-gray); }
.features-bar .container { display: flex; justify-content: space-around; align-items: center; text-align: center; }
.feature-item i { font-size: 2.8rem; color: var(--accent-color-primary); margin-bottom: 15px; transition: transform 0.3s ease; }
.feature-item:hover i { transform: scale(1.1) rotate(-5deg); }
.feature-item h3 { font-size: 1.2rem; font-weight: 700; color: var(--dark-gray); }
.slanted-bg { background-color: var(--white); position: relative; z-index: 1; }
.slanted-bg::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: inherit; transform: skewY(-3deg); z-index: -1; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.category-card { position: relative; height: 280px; border-radius: var(--border-radius-soft); overflow: hidden; background-size: cover; background-position: center; color: var(--white); transition: transform 0.4s ease; box-shadow: var(--card-shadow); }
.category-card:hover { transform: translateY(-10px) scale(1.03); }
.category-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0) 50%); display: flex; align-items: flex-end; justify-content: center; padding: 20px; transition: background 0.4s ease; }
.category-overlay h3 { font-size: 1.5rem; font-weight: 700; text-align: center; transform: translateY(10px); opacity: 0; transition: all 0.4s ease; }
.category-card:hover .category-overlay h3 { transform: translateY(0); opacity: 1; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.product-card { background-color: var(--white); border-radius: var(--border-radius-soft); overflow: hidden; text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; box-shadow: var(--card-shadow); display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); }
.product-image { overflow: hidden; }
.product-image img { width: 100%; height: auto; display: block; transition: transform 0.4s ease; }
.product-card:hover .product-image img { transform: scale(1.1); }
.product-info { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between;  transition: transform 0.3s ease-in-out;}
.product-name { font-size: 1.1rem; font-weight: 500; color: var(--dark-gray); margin-bottom: 10px; }
.product-price { font-size: 1.2rem; font-weight: 700; color: var(--accent-color-primary); margin: 15px 0; }
.add-to-cart-btn { background: var(--gradient); color: var(--white); padding: 12px 20px; border-radius: var(--border-radius-pill); border: none; cursor: pointer; transition: all 0.3s ease; }
.add-to-cart-btn:hover { transform: scale(1.05); box-shadow: 0 5px 10px rgba(52, 152, 219, 0.3); }
.cta-banner { background: var(--gradient); color: var(--white); padding: 80px 0; text-align: center; position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; top: -50px; left: -50px; width: 200px; height: 200px; border: 20px solid rgba(255,255,255,0.1); border-radius: 50%; }
.cta-banner h2 { font-size: 2.8rem; margin-bottom: 15px; font-weight: 800; }
.cta-button-light { background-color: var(--white); color: var(--dark-gray); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); }
.cta-button-light:hover { background-color: var(--light-gray); transform: translateY(-3px); box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15); }
.site-footer-main { background-color: var(--dark-gray); color: #bdc3c7; padding-top: 80px; position: relative; }
.footer-content {
    display: grid;
    /* ویرایش اصلی اینجاست: ستون‌های خالی اطراف را حذف کرده و ستون‌های محتوا را تعریف می‌کنیم */
    grid-template-columns: 2fr 1fr 1fr;
    /* این خط جدید و جادویی، کل گروه سه ستونی را در مرکز قرار می‌دهد */
    justify-content: center;
    gap: 60px; /* فاصله را کمی بیشتر کردم تا زیباتر شود، می‌توانید تغییر دهید */
    padding-bottom: 40px;
    border-bottom: 1px solid #4a637c;
}.footer-column h4, .footer-logo { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; color: var(--white); }
.footer-column.links a:hover { color: var(--accent-color-primary); padding-right: 8px; }
.social-icons a { color: #bdc3c7; font-size: 1.5rem; margin-left: 15px; }
.social-icons a:hover { color: var(--accent-color-primary); transform: translateY(-3px); }
.newsletter-form { display: flex; margin-top: 15px; }
.newsletter-form input { flex-grow: 1; padding: 12px 15px; border: 1px solid #4a637c; border-radius: 0 var(--border-radius-pill) var(--border-radius-pill) 0; font-family: 'Vazirmatn', sans-serif; background-color: #34495e; color: var(--white); }
.newsletter-form button { padding: 12px 20px; border: none; background: var(--gradient); color: var(--white); cursor: pointer; border-radius: var(--border-radius-pill) 0 0 var(--border-radius-pill); font-size: 1.2rem; }
.footer-bottom { text-align: center; padding: 25px 0; font-size: 0.9rem; }
.page-header { background-color: var(--white); padding: 40px 0; text-align: center; border-bottom: 1px solid #e9ecef; }
.page-header h1 { font-size: 2.8rem; font-weight: 800; color: var(--dark-gray); margin-bottom: 10px; }
.breadcrumb { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 0; margin: 0; font-size: 0.9rem; list-style: none; }
.breadcrumb-item a:hover { color: var(--accent-color-primary); }
.breadcrumb-item.active { color: var(--accent-color-primary); font-weight: 500; }
.breadcrumb-item:not(:first-child)::before { content: '\f104'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: #ced4da; margin-left: 8px; }
.products-layout { display: grid; grid-template-columns: 280px 1fr; gap: 30px; }
.filters-sidebar { background-color: var(--white); padding: 25px; border-radius: var(--border-radius-soft); box-shadow: var(--card-shadow); height: fit-content; position: sticky; top: 100px; }
.filter-group { padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #e9ecef; }
.filter-group:last-child { border-bottom: none; margin-bottom: 0; }
.filter-group h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.filter-group ul li a { display: block; padding: 8px 10px; margin-bottom: 5px; border-radius: 8px; }
.filter-group ul li a:hover { background-color: #f1f3f5; }
.filter-group ul li a.active { background: var(--gradient); color: var(--white); font-weight: 500; }
.price-range-slider .slider { width: 100%; height: 5px; background: #dee2e6; border-radius: 5px; }
.price-values { display: flex; justify-content: space-between; font-size: 0.9rem; margin-top: 10px; }
.custom-checkbox { display: block; position: relative; padding-right: 30px; cursor: pointer; }
.custom-checkbox input { position: absolute; opacity: 0; }
.checkmark { position: absolute; top: 2px; right: 0; height: 20px; width: 20px; background-color: #eee; border-radius: 5px; }
.custom-checkbox input:checked ~ .checkmark { background: var(--gradient); }
.checkmark:after { content: ""; position: absolute; display: none; right: 7px; top: 3px; width: 5px; height: 10px; border: solid white; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.custom-checkbox input:checked ~ .checkmark:after { display: block; }
.filter-apply-btn { width: 100%; padding: 12px; background: var(--gradient); color: white; border: none; border-radius: var(--border-radius-pill); font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.3s ease; }
.filter-apply-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(52, 152, 219, 0.3); }
.sorting-bar { display: flex; justify-content: flex-end; align-items: center; gap: 15px; margin-bottom: 30px; }
.sorting-bar label { font-weight: 500; }
.custom-select { padding: 12px 20px 12px 45px; border: 1px solid #ced4da; border-radius: var(--border-radius-soft); background-color: white; font-family: 'Vazirmatn', sans-serif; font-size: 1rem; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: left 1rem center; background-size: 16px 12px; cursor: pointer; }
.custom-select:focus { outline: none; border-color: var(--accent-color-primary); box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); }
.products-grid-area .product-grid { grid-template-columns: repeat(3, 1fr); }
.pagination { display: flex; justify-content: center; margin-top: 50px; }
.pagination ul { display: flex; gap: 8px; }
.pagination a { display: block; width: 40px; height: 40px; line-height: 40px; text-align: center; border-radius: 50%; background-color: var(--white); border: 1px solid #dee2e6; }
.pagination a:hover { background-color: #f1f3f5; }
.pagination a.active { background: var(--gradient); color: var(--white); border-color: transparent; }
.pagination a.disabled { color: #adb5bd; pointer-events: none; }

/* ======================= Responsive Design & Mobile Menu ======================= */
@media (max-width: 992px) {
    .nav-toggle { display: block; }
    .header-content { justify-content: space-between; }
    .header-actions { display: none; } /* Hide desktop icons */

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 280px;
        height: 100vh;
        background-color: var(--dark-gray);
        padding-top: 80px;
        transition: right 0.4s ease-in-out;
        z-index: 1005;
        display: flex;
        flex-direction: column;
    }
    .main-nav.nav-open { right: 0; } /* Slide in */
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav a { color: var(--white); display: block; padding: 15px 25px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
    .main-nav a.active, .main-nav a:hover { background-color: var(--accent-color-primary); }
    .main-nav a::after { display: none; }

    /* Mobile-only icons inside the nav */
    .mobile-nav-actions {
        display: flex;
        justify-content: center;
        gap: 30px;
        padding: 20px;
        /* margin-top: auto;  <-- این خط حذف یا کامنت شد */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        
        /* === این دو خط جدید اضافه شد === */
        margin-top: auto; /* این خط باقی می‌ماند تا بخش آیکون‌ها به پایین بچسبد */
        padding-bottom: 100px; /* این خط یک فاصله ۵۰ پیکسلی از پایین‌ترین نقطه منو ایجاد می‌کند */
    }    .mobile-nav-actions a {
        color: var(--white);
        font-size: 1.5rem;
    }

    .category-grid, .featured-products .product-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: repeat(2, 1fr); }
    .hero-content h1 { font-size: 3rem; }
    .products-layout { grid-template-columns: 1fr; }
    .filters-sidebar { position: static; margin-bottom: 30px; }
    .products-grid-area .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .section-padding { padding: 80px 0; }
    .features-bar .container { flex-direction: column; gap: 40px; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-column.about, .footer-column.newsletter { align-items: center; }
    .newsletter-form { justify-content: center; }
    .social-icons { text-align: center; }
    .sorting-bar { flex-direction: column; align-items: stretch; gap: 10px; }
}

@media (max-width: 576px) {
    .category-grid, .featured-products .product-grid, .products-grid-area .product-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1rem; }
    .section-title { font-size: 2rem; }
}
/* ======================= Product Details Page ======================= */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}
/* Product Gallery */
.product-gallery { display: flex; flex-direction: column; gap: 15px; position: sticky; top: 100px; }
.main-image-container { border: 1px solid #e9ecef; border-radius: var(--border-radius-soft); overflow: hidden; }
.main-image-container img { width: 100%; height: auto; display: block; }
.thumbnail-container { display: flex; gap: 10px; }
.thumbnail {
    width: 80px; height: 80px; object-fit: cover;
    border: 2px solid #e9ecef; border-radius: 8px;
    cursor: pointer; transition: all 0.3s ease;
}
.thumbnail:hover { border-color: var(--accent-color-primary); }
.thumbnail.active { border-color: var(--accent-color-primary); box-shadow: 0 0 10px rgba(52, 152, 219, 0.3); }

/* Product Info & Actions */
.product-info-details .product-title-large { font-size: 2.2rem; font-weight: 800; color: var(--dark-gray); margin-bottom: 15px; }
.product-info-details .stock-status {
    background-color: #e8f5e9; color: #2e7d32;
    padding: 5px 12px; border-radius: var(--border-radius-pill);
    font-size: 0.9rem; font-weight: 500;
}
.product-info-details .product-short-desc { margin: 20px 0; font-size: 1rem; line-height: 1.8; }
.price-box-large {
    font-size: 2.5rem; font-weight: 800; color: var(--accent-color-primary);
    margin-bottom: 25px;
}
.price-box-large span { font-size: 1.2rem; font-weight: 500; margin-right: 5px; }
.actions-box { display: flex; gap: 15px; align-items: stretch; margin-bottom: 25px; }
.quantity-selector {
    display: flex;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius-pill);
    overflow: hidden;
    height: 55px; /* ارتفاع جدید برای بزرگ‌تر شدن */
}
.quantity-selector input {
    width: 70px; /* عرض بیشتر برای عدد */
    text-align: center;
    border: none;
    font-size: 1.4rem; /* فونت بزرگتر برای عدد */
    font-weight: 700;
    font-family: 'Vazirmatn';
    outline: none;
    color: var(--dark-gray);
}
.quantity-selector .quantity-btn {
    width: 50px; /* عرض بیشتر برای دکمه‌های + و - */
    border: none;
    background-color: #f1f3f5;
    font-size: 1.8rem; /* فونت بزرگتر برای + و - */
    cursor: pointer;
    transition: background-color 0.2s;
}.quantity-selector input { width: 60px; text-align: center; border: none; font-size: 1.2rem; font-family: 'Vazirmatn'; outline: none; }
.quantity-btn {
    width: 40px; border: none; background-color: #f1f3f5;
    font-size: 1.5rem; cursor: pointer; transition: background-color 0.2s;
}
.quantity-btn:hover { background-color: #e9ecef; }
.add-to-cart-btn-large {
    flex-grow: 1;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-pill);
    font-size: 1.2rem; /* فونت بزرگتر */
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px; /* فاصله بیشتر بین آیکون و متن */
    padding: 15px 20px; /* پدینگ بیشتر برای بزرگ‌تر شدن */
    transition: all 0.3s ease;
}
.add-to-cart-btn-large:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(52, 152, 219, 0.3); }

.product-meta { font-size: 0.9rem; color: #6c757d; }
.product-meta span { display: block; margin-top: 8px; }
.product-meta a { color: var(--accent-color-primary); font-weight: 500; }

/* Product Tabs */
.product-tabs-container { margin-top: 80px; }
.tab-buttons { display: flex; gap: 10px; border-bottom: 2px solid #e9ecef; margin-bottom: 30px; }
.tab-btn {
    padding: 15px 25px; border: none; background: none; cursor: pointer;
    font-size: 1.1rem; font-weight: 500; color: var(--text-color);
    border-bottom: 3px solid transparent; transform: translateY(2px);
    transition: all 0.3s ease;
}
.tab-btn.active { color: var(--accent-color-primary); border-bottom-color: var(--accent-color-primary); }
.tab-pane { display: none; animation: fadeInUp 0.5s; line-height: 1.9; }
.tab-pane.active { display: block; }

.specs-table { width: 100%; border-collapse: collapse; }
.specs-table td { padding: 15px; border-bottom: 1px solid #e9ecef; }
.specs-table tr:nth-child(odd) { background-color: #f8f9fa; }
.specs-table tr td:first-child { font-weight: 500; }

.review-card {
    background-color: #f8f9fa; padding: 20px;
    border-radius: var(--border-radius-soft);
    border-right: 4px solid var(--accent-color-primary);
    margin-bottom: 15px;
}

/* Related Products Section */
.related-products .product-grid { grid-template-columns: repeat(4, 1fr); }
/* --- Style for Active Icon in Header --- */
/* For Desktop */
.header-actions a.active-icon,
.header-actions a:hover {
    color: var(--accent-color-primary);
    transform: scale(1.1);
}

/* For Mobile Menu */
.mobile-nav-actions a.active-icon {
    background-color: var(--accent-color-primary);
    border-radius: 8px;
}

.mobile-nav-actions a.active-icon i {
    color: var(--white); /* Ensure the icon is white on the blue background */
}

/* --- Keep normal hover effect for other icons --- */
.header-actions a:not(.active-icon):hover {
    color: var(--accent-color-primary);
    transform: scale(1.1);
}

/* Responsive for Product Details Page */
@media (max-width: 992px) {
    .product-detail-layout { grid-template-columns: 1fr; }
    .product-gallery { position: static; } /* Remove sticky on smaller screens */
    .related-products .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .actions-box { flex-direction: column; }
    .add-to-cart-btn-large { padding: 15px; }
    .related-products .product-grid { grid-template-columns: 1fr; }
    .tab-buttons { gap: 0; }
    .tab-btn { padding: 12px 15px; font-size: 1rem; }
}




/* Styling for making the entire product card a link */
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block; /* Important for the link to take up the grid space */
}

/* Overwrite the previous add-to-cart-btn and style the new span */
.add-to-cart-btn {
    display: none; /* Hide the old button if it still exists */
}

/* New button style that appears on hover */
.view-details-btn {
    background: var(--gradient);
    color: var(--white);
    padding: 12px 20px;
    border-radius: var(--border-radius-pill);
    transition: all 0.3s ease;
    
    /* Position it inside the card, initially hidden */
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px); /* Start slightly lower */
    opacity: 0;
    white-space: nowrap; /* Prevent text wrapping */
    z-index: 5; /* Ensure it's above product-info */
}

/* Show the button when hovering over the card link */
.product-card-link:hover .view-details-btn {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Ensure the product-card itself is positioned to contain the button */
.product-card {
    position: relative; /* This is crucial for the absolute positioning of the button */
    padding-bottom: 20px; /* Add some space at the bottom */
}
/* ======================= Cart Page Styles ======================= */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 for table, 1/3 for summary */
    gap: 30px;
    align-items: flex-start;
}

/* Cart Items Table */
.cart-items-list {
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--card-shadow);
}
.cart-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}
.cart-table th {
    padding-bottom: 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 2px solid #e9ecef;
}
.cart-table td {
    padding: 20px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}
.cart-item:last-child td {
    border-bottom: none;
}
.product-image-cell img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}
.product-name-cell a {
    font-weight: 500;
    color: var(--dark-gray);
}
.product-name-cell a:hover {
    color: var(--accent-color-primary);
}

.quantity-selector-cart {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius-pill);
    overflow: hidden;
    width: 110px;
    /* این خط ویرایش شد */
    margin-right: auto; 
}
.quantity-selector-cart input {
    width: 40px;
    text-align: center;
    border: none;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
}
.quantity-selector-cart .quantity-btn {
    width: 35px;
    border: none;
    background-color: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.quantity-selector-cart .quantity-btn:hover {
    background-color: #f1f3f5;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}
.remove-item-btn:hover {
    color: #a71d2a;
}

/* Cart Summary Box */
.cart-summary {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 100px;
}
.cart-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
}
.summary-row span:last-child {
    font-weight: 500;
}
.coupon-section {
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px dashed #ced4da;
    border-bottom: 1px dashed #ced4da;
}
.coupon-form {
    display: flex;
    margin-top: 10px;
}
.coupon-form input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 0 8px 8px 0;
    font-family: inherit;
    border-left: none;
}
.coupon-form button {
    padding: 10px 20px;
    border: none;
    background-color: var(--dark-gray);
    color: var(--white);
    border-radius: 8px 0 0 8px;
    cursor: pointer;
}
.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 25px;
    color: var(--dark-gray);
}
.checkout-btn {
    width: 100%;
    margin-top: 25px;
    text-align: center;
    justify-content: center; /* for flex items */
}

/* Empty Cart View */
.cart-empty {
    text-align: center;
}
.cart-empty i {
    font-size: 5rem;
    color: #ced4da;
    margin-bottom: 25px;
}
.cart-empty h2 {
    font-size: 2rem;
    color: var(--dark-gray);
    margin-bottom: 15px;
}
.cart-empty p {
    margin-bottom: 30px;
}

/* Responsive for Cart Page */
@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr; /* Stack on smaller screens */
    }
    .cart-summary {
        position: static; /* Remove sticky summary */
    }
}

@media (max-width: 768px) {
    /* Hide table headers and show data with labels */
    .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: 20px;
        border: 1px solid #e9ecef;
        border-radius: var(--border-radius-soft);
        padding: 15px;
    }
    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 10px 0;
        border: none;
    }
    .cart-table td:before {
        content: attr(data-label);
        font-weight: 500;
        text-align: right;
        padding-left: 15px;
    }
    .product-image-cell, .product-name-cell {
        justify-content: flex-start !important;
    }
    .remove-item-btn { width: 100%; text-align: center; background-color: #f8d7da; padding: 10px; border-radius: 8px; margin-top: 10px;}
}


/* ======================= Checkout Page Styles ======================= */
.checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: flex-start;
}

.checkout-form-container {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--card-shadow);
}

.form-section {
    margin-bottom: 40px;
}
.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}
.form-group textarea {
    resize: vertical;
}

/* Payment Methods */
.payment-methods {
    display: grid;
    gap: 15px;
}
.payment-method-label {
    display: block;
    cursor: pointer;
}
.payment-method-label input[type="radio"] {
    display: none;
}
.payment-method-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius-soft);
    transition: all 0.2s ease;
}
.payment-method-card i {
    font-size: 1.8rem;
    color: var(--accent-color-primary);
}
.payment-method-label input[type="radio"]:checked + .payment-method-card {
    border-color: var(--accent-color-primary);
    background-color: #f0f8ff;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.1);
}

/* Checkout Summary */
.checkout-summary {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: var(--border-radius-soft);
    border: 1px solid #e9ecef;
    position: sticky;
    top: 100px;
}
.checkout-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.summary-product-list {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ced4da;
}
.summary-product {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}
.summary-product span:first-child {
    color: #6c757d;
}

.checkout-summary .summary-row,
.checkout-summary .summary-total {
    margin-bottom: 15px;
}

.checkout-summary .terms-notice {
    font-size: 0.9rem;
    text-align: center;
    color: #6c757d;
    margin-top: 30px;
}
.terms-notice a {
    color: var(--accent-color-primary);
    font-weight: 500;
}

/* Responsive for Checkout Page */
@media (max-width: 992px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    .checkout-summary {
        position: static;
        margin-top: 30px;
    }
}
@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}
/* Add this rule as well */
.product-card-link:hover .product-info {
    transform: translateY(-55px); /* Move the info section up by 55px */
}

/* ======================= Order Tracking Page Styles ======================= */
.tracking-form-wrapper,
.tracking-result-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--card-shadow);
    text-align: center;
}
.tracking-form-wrapper h2,
.tracking-result-wrapper h2 {
    font-size: 1.8rem;
    color: var(--dark-gray);
    margin-bottom: 15px;
}
.tracking-form-wrapper p {
    color: #6c757d;
    margin-bottom: 30px;
}
.tracking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.tracking-form .form-group {
    text-align: right;
}
.tracking-form .cta-button {
    justify-content: center; /* Center button text/icon */
    margin-top: 10px;
}
.order-id-highlight {
    color: var(--accent-color-primary);
    font-weight: 800;
}

/* Order Timeline */
.order-timeline {
    position: relative;
    margin-top: 40px;
    padding-right: 25px; /* Space for the line and icons */
}
/* The vertical line */
.order-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    right: 35px; /* Positioned to the right */
    height: 100%;
    width: 3px;
    background-color: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    text-align: right;
}
.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    right: -17px; /* Positioned on the line */
    top: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 3px solid var(--light-gray);
}
.timeline-content {
    padding-right: 50px;
}
.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.timeline-content p {
    font-size: 0.95rem;
    color: #6c757d;
}
.timeline-date {
    font-size: 0.85rem;
    color: #adb5bd;
    margin-top: 5px;
    display: block;
}

/* Timeline Item States */
.timeline-item.completed .timeline-icon {
    background-color: #28a745; /* Green for completed */
    color: var(--white);
}
.timeline-item.completed .timeline-content h3 {
    color: var(--dark-gray);
}

.timeline-item.active .timeline-icon {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.2);
}
.timeline-item.active .timeline-content h3 {
    color: var(--accent-color-primary);
}
/* ======================= Account Page Styles ======================= */
.account-layout {
    display: grid;
    grid-template-columns: 250px 1fr; /* Sidebar nav and content */
    gap: 30px;
    align-items: flex-start;
}
/* =======================================
   استایل نهایی و کامل برای وضعیت‌های سفارش (Badge)
   ======================================= */
.status-badge {
    padding: 5px 12px;
    border-radius: var(--border-radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--white);
    text-align: center;
    display: inline-block;
    min-width: 90px; /* یک عرض حداقلی برای زیبایی بیشتر */
}

/* در حال انجام (آبی) */
.status-badge.processing {
    background-color: #0d6efd;
}

/* تکمیل شده (سبز) */
.status-badge.completed {
    background-color: #198754;
}

/* ارسال شده (نارنجی) */
.status-badge.shipped {
    background-color: #fd7e14;
}

/* لغو شده (خاکستری) */
.status-badge.canceled {
    background-color: #6c757d;
}

/* ناموفق (قرمز) */
.status-badge.failed {
    background-color: #dc3545;
}

/* در انتظار پرداخت (زرد) */
.status-badge.pending {
    background-color: #ffc107;
    color: #212529; /* متن مشکی برای خوانایی بهتر روی زرد */
}

/* اگر وضعیت نامشخص بود، یک رنگ پیش‌فرض می‌گیرد */
.status-badge:not(.processing):not(.completed):not(.shipped):not(.canceled):not(.failed):not(.pending) {
    background-color: #adb5bd;
}
/* Account Navigation */
.account-nav {
    background-color: var(--white);
    padding: 15px 0;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--card-shadow);
}
.account-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.account-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    font-weight: 500;
    color: var(--text-color);
    border-right: 4px solid transparent;
    transition: all 0.2s ease;
}
.account-nav a:hover {
    background-color: #f8f9fa;
    color: var(--dark-gray);
}
.account-nav a.active {
    background-color: #f0f8ff;
    border-right-color: var(--accent-color-primary);
    color: var(--accent-color-primary);
    font-weight: 700;
}
.account-nav a i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* Account Content Panel */
.account-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--card-shadow);
}
.account-panel {
    display: none;
    animation: fadeInUp 0.5s;
}
.account-panel.active {
    display: block;
}
.account-panel h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}
.account-panel p {
    line-height: 1.9;
    margin-bottom: 15px;
}

/* Orders Table */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}
.orders-table th, .orders-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}
.orders-table thead {
    background-color: #f8f9fa;
}
.status-shipped { color: #fd7e14; }
.status-delivered { color: #28a745; }
.view-order-btn {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 5px 15px;
    border-radius: var(--border-radius-pill);
    font-size: 0.9rem;
}
.view-order-btn:hover {
    background-color: var(--accent-color-primary);
}

/* Address Card */
.address-card {
    border: 1px solid #e9ecef;
    padding: 20px;
    border-radius: var(--border-radius-soft);
    position: relative;
}
.address-card address {
    font-style: normal;
    line-height: 1.8;
}
.edit-address-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--accent-color-primary);
}

/* Details Form */
.details-form hr {
    border: 0;
    border-top: 1px solid #e9ecef;
    margin: 30px 0;
}

/* Responsive for Account Page */
@media (max-width: 992px) {
    .account-layout {
        grid-template-columns: 1fr;
    }
    .account-nav {
        display: flex;
        overflow-x: auto; /* Allow horizontal scroll for nav */
    }
    .account-nav ul {
        display: flex;
        flex-wrap: nowrap;
    }
    .account-nav a {
        border-right: none;
        border-bottom: 4px solid transparent;
        white-space: nowrap; /* Prevent nav items from wrapping */
    }
     .account-nav a.active {
        border-bottom-color: var(--accent-color-primary);
    }
}

/* ======================= Contact Page Styles ======================= */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Info on left, form on right */
    gap: 40px;
    align-items: flex-start;
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--card-shadow);
}
.contact-info-wrapper, .contact-form-wrapper {
    
}
.contact-info-wrapper h3, .contact-form-wrapper h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark-gray);
}
.contact-info-wrapper p, .contact-form-wrapper p {
    color: #6c757d;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* Contact Details List */
.contact-details-list {
    list-style: none;
    padding: 0;
}
.contact-details-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1rem;
}
.contact-details-list i {
    font-size: 1.5rem;
    color: var(--accent-color-primary);
    margin-top: 5px;
    width: 25px;
    text-align: center;
}
.contact-details-list a {
    color: var(--text-color);
}
.contact-details-list a:hover {
    color: var(--accent-color-primary);
}

/* Contact Form */
.contact-form .cta-button {
    width: 100%;
    justify-content: center;
}

/* Map Section */
.map-section {
    /* No padding needed, the iframe takes the full width */
    line-height: 0; /* Removes any extra space below the iframe */
}

/* Responsive for Contact Page */
@media (max-width: 992px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* ======================= About Us Page Styles ======================= */

/* Story Section */
.about-section-story {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}
.story-image img {
    width: 100%;
    border-radius: var(--border-radius-soft);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.story-text h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-gray);
    margin-bottom: 20px;
}
.story-text p {
    line-height: 1.9;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}
.value-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.value-card i {
    font-size: 3rem;
    color: var(--accent-color-primary);
    margin-bottom: 20px;
}
.value-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

/* Responsive for About Page */
@media (max-width: 992px) {
    .about-section-story {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
@media (max-width: 768px) {
    .values-grid {
        grid-template-columns: 1fr;
    }
}


/* ======================= Auth (Login/Register) Page Styles (FINAL) ======================= */
.auth-page-content {
    background-color: #e9ecef;
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 40px 0;
}
.auth-wrapper {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--card-shadow);
}
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #f1f3f5;
    border-radius: var(--border-radius-pill);
    padding: 5px;
    margin-bottom: 30px;
}
.auth-tab-btn {
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--border-radius-pill);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
}
.auth-tab-btn.active {
    background-color: var(--white);
    color: var(--accent-color-primary);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* This is the key for consistent height */
.auth-form-container {
    position: relative;
    /* The height is controlled by JS to prevent jumping */
    transition: height 0.3s ease-in-out; 
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    /* Positioned absolutely to not affect the container's initial height calculation */
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s;
}
.auth-form.active {
    position: relative; /* Bring the active form back into the document flow */
    opacity: 1;
    visibility: visible;
}

.auth-form .form-group {
    margin-bottom: 0;
}
/* Password field with correctly positioned toggle icon */
/* ======================= Auth Form Password Field Fix ======================= */

/* A wrapper to contain both input and icon */
.password-input-wrapper {
    position: relative;
}

/* Style the input field inside the wrapper */
.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    /* The padding on the left creates space for the icon */
    padding-left: 45px !important;
}

/* Correctly position the icon inside the wrapper */
.password-input-wrapper .toggle-password {
    position: absolute;
    top: 50%;
    left: 15px; /* Position on the left side */
    transform: translateY(-50%);
    cursor: pointer;
    color: #adb5bd;
    z-index: 2; /* Ensure it's clickable */
}
.auth-btn {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

/* Responsive adjustments specific to auth page */
@media (max-width: 992px) {
    /* No changes needed here for auth page specifically as it's already responsive */
}

/* ======================= 404 Error Page Styles ======================= */
.error-404-content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70vh;
}
.error-wrapper {
    max-width: 600px;
}
.error-code {
    font-size: 10rem;
    font-weight: 900;
    line-height: 1;
    color: var(--accent-color-primary);
    opacity: 0.2;
    margin-bottom: -30px; /* Overlap with title */
}
.error-wrapper h1 {
    font-size: 2.5rem;
    color: var(--dark-gray);
    margin-bottom: 15px;
}
.error-wrapper p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 30px;
}






/* ======================= Product Variations (Dropdown Style) - ADD THIS ======================= */
.product-variations {
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns for dropdowns */
    gap: 20px;
}
.product-variations .form-group {
    margin-bottom: 0; /* Remove default margin from forms */
}
.product-variations .form-group label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark-gray);
}
/* Re-using the .custom-select style for variations */
.variation-select {
    width: 100%;
}
/* ======================= Blog Promo using Category Style (Rectangular - Final Fix) ======================= */
.promo-blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* دو ستون کنار هم */
    gap: 30px;
}
.promo-blog-grid .category-card {
    height: 280px; /* این ارتفاع را کم کردیم تا کارت مستطیلی شود. می‌توانید کمتر هم بکنید. */
}
.promo-blog-grid .category-overlay h3 {
    font-size: 1.8rem; 
    padding: 0 20px;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .promo-blog-grid {
        grid-template-columns: 1fr;
    }
}


















/* ======================= Cooperation Form Section ======================= */
.cooperation-form-section {
    margin-top: 50px; /* فاصله از بخش بالایی */
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--card-shadow);
}

.cooperation-form-section .contact-form-wrapper {
    padding: 0; /* حذف پدینگ اضافی */
    box-shadow: none; /* حذف سایه اضافی */
}









/* ======================= About Us Page Content Blocks ======================= */

/* The main container for image and text */
.about-content-block {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 60px; /* Space between image and text */
    align-items: center;
    margin-bottom: 100px; /* Space below each block */
}

/* This class reverses the column order */
.about-content-block.reverse {
    direction: ltr; /* This flips the grid items order */
}

/* This resets the text direction for the content inside the reversed block */
.about-content-block.reverse .about-content-text {
    direction: rtl; 
}

/* Styling for the image container */
.about-content-image img {
    width: 100%;
    border-radius: var(--border-radius-soft);
    box-shadow: 0 15px 35px rgba(44, 62, 80, 0.15);
}

/* Styling for the text container */
.about-content-text {
    text-align: right;
}
.about-content-text i {
    font-size: 2.5rem;
    color: var(--accent-color-primary);
    margin-bottom: 15px;
}
.about-content-text h2 {
    font-size: 2.2rem;
    color: var(--dark-gray);
    margin-bottom: 20px;
}
.about-content-text p {
    line-height: 2.2;
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .about-content-block,
    .about-content-block.reverse {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
        direction: rtl; /* Reset direction for all */
        text-align: center;
    }
    .about-content-image {
        order: -1; /* Move image to the top */
        margin-bottom: 30px;
    }
}













/* ======================= Contact Page (Map Inside Info Box) ======================= */

/* Make the info wrapper a flex column to stack items vertically */
.contact-info-wrapper {
    display: flex;
    flex-direction: column;
}

/* The list of contact details */
.contact-details-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px; /* Add space between list and map */
}
.contact-details-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1rem;
}
.contact-details-list i {
    font-size: 1.5rem;
    color: var(--accent-color-primary);
    margin-top: 5px;
    width: 25px;
    text-align: center;
}

/* Map container inside the contact info box */
.contact-map-container {
    margin-top: auto; /* Pushes the map to the bottom of the flex container */
    border-radius: var(--border-radius-soft);
    overflow: hidden;
    line-height: 0; /* To remove extra space under iframe */
    border: 1px solid #e9ecef; /* Optional: adds a nice border */
}

/* Hide the old, separate map section if it exists */
.map-section {
    display: none; 
}




/* ======================= Responsive Fix for Product Card Button ======================= */

/* First, ensure the default hover button is correctly positioned */
.view-details-btn {
    position: absolute;
    bottom: 25px; /* Adjust vertical position */
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
    background: var(--gradient);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--border-radius-pill);
    white-space: nowrap;
}

.product-card-link:hover .view-details-btn {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.product-card-link:hover .product-info {
    transform: translateY(-55px);
}


/* --- MOBILE-SPECIFIC FIX --- */
/* On screens smaller than 992px (tablets and phones) */
@media (max-width: 992px) {
    /* Make the button always visible on mobile, not on hover */
    .view-details-btn {
        position: static; /* Remove absolute positioning */
        display: inline-block; /* Make it a block-level element */
        transform: none; /* Reset transform */
        opacity: 1; /* Make it always visible */
        margin-top: 15px; /* Add space above the button */
        width: auto; /* Let it size to its content */
    }

    /* Disable the hover effect on mobile */
    .product-card-link:hover .product-info {
        transform: none; /* Prevent the info from moving up */
    }
    
    .product-info {
        padding-bottom: 0; /* Reset padding if any was added before */
    }
}

.forgot-password-link {
    color: var(--accent-color-primary);
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-align: center;
    display: block;
    margin-top: 15px;      /* این خط اصلاح شد - فاصله از بالا */
    margin-bottom: 25px;   /* فاصله از پایین تا دکمه */
}








/* ======================= Forgot Password Page Styles ======================= */
.auth-form-header {
    text-align: center;
    margin-bottom: 30px;
}
.auth-form-header h3 {
    font-size: 1.5rem;
    color: var(--dark-gray);
    margin-bottom: 10px;
}
.auth-form-header p {
    color: #6c757d;
    font-size: 0.95rem;
}

.back-to-login-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
}
.back-to-login-link:hover {
    color: var(--accent-color-primary);
}









/* ========================================================
   طراحی نهایی و ریسپانسیو برای فوتر
   ======================================================== */

.site-footer-main {
    background-color: var(--dark-gray);
    color: #bdc3c7;
    padding: 80px 0 30px 0;
    position: relative;
    line-height: 1.8;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    justify-content: center;
    gap: 60px;
    padding-bottom: 60px;
}

.footer-column h4,
.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--white);
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after,
.footer-logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color-primary);
    border-radius: 2px;
    transition: all 0.3s ease; /* انیمیشن برای تغییرات ریسپانسیو */
}

.footer-column.links a {
    transition: color 0.3s, padding-right 0.3s;
}

.footer-column.links a:hover {
    color: var(--white);
    padding-right: 8px;
}

.social-icons {
    margin-top: 25px;
    display: flex;
    gap: 12px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: #bdc3c7;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--accent-color-primary);
    color: var(--white);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    font-size: 0.9rem;
    position: relative;
    opacity: 0.8;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #4a637c;
    border-radius: 2px;
}


/* =================================
   بخش ریسپانسیو مخصوص فوتر جدید
   ================================= */

/* --- ریسپانسیو برای تبلت (مثلاً زیر 992 پیکسل) --- */
@media (max-width: 992px) {
    .footer-content {
        /* ستون‌ها را به ۲ ستون مساوی تغییر می‌دهیم */
        grid-template-columns: 1fr 1fr;
        gap: 40px; /* فاصله را کمی کمتر می‌کنیم */
    }
}

/* --- ریسپانسیو برای موبایل (مثلاً زیر 768 پیکسل) --- */
@media (max-width: 768px) {
    .footer-content {
        /* همه ستون‌ها زیر هم قرار می‌گیرند */
        grid-template-columns: 1fr;
    }

    .footer-column {
        /* محتوای هر ستون را وسط‌چین می‌کنیم */
        text-align: center;
    }
    
    /* خط زیرین عناوین را هم وسط‌چین می‌کنیم */
    .footer-column h4::after,
    .footer-logo::after {
        right: 50%;
        transform: translateX(50%);
    }

    /* آیکون‌های شبکه‌های اجتماعی را هم وسط‌چین می‌کنیم */
    .social-icons {
        justify-content: center;
    }
}








/* === این بلوک کد را به طور کامل از style.css حذف کن === */

/* استایل برای دکمه‌های مختلف محصول */
.add-to-cart-btn-large.btn-disabled {
    background: #adb5bd; /* خاکستری */
    cursor: not-allowed;
    box-shadow: none;
    text-decoration: none; 
}

.add-to-cart-btn-large.btn-disabled:hover {
    transform: none;
    background: #adb5bd;
}

.add-to-cart-btn-large.btn-call {
    background: #28a745; /* سبز */
    text-decoration: none;
}
.add-to-cart-btn-large.btn-call:hover {
    background: #218838;
}



/* استایل برای گروه اینپوت‌های قیمت */
.price-input-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.price-input-group .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* استایل برای اینپوت‌های قیمت */
/* استایل برای اینپوت‌های قیمت (اصلاح شده برای اعداد بزرگ) */
.price-input-group input[type="text"],
.price-input-group input[type="number"] {
    width: 100%;
    padding: 10px 8px; /* فاصله داخلی چپ و راست کمتر شد */
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem; /* اندازه فونت کمی کوچک‌تر شد */
    text-align: center; /* عدد در مرکز باکس قرار می‌گیرد */
}

.price-input-group input[type="number"]::-webkit-outer-spin-button,
.price-input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; /* برای مخفی کردن فلش‌های بالا/پایین در کروم و سافاری */
    margin: 0;
}



/* =======================================
   Styles for Auth Form Messages
   ======================================= */
.auth-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    border: 1px solid transparent;
    animation: fadeInUp 0.4s ease; /* انیمیشن زیبا برای نمایش پیام */
}

.auth-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.auth-message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}




/* =======================================
   Styles for Custom Alert Modal (Popup)
   ======================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-soft);
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
}

.modal-icon-container.success { background: #28a745; }
.modal-icon-container.error { background: #dc3545; }
.modal-icon-container.info { background: var(--accent-color-primary); }

.modal-box h3 {
    font-size: 1.5rem;
    color: var(--dark-gray);
    margin-bottom: 15px;
}

.modal-box p {
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.8;
}

.modal-close-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius-pill);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
    background: var(--gradient);
    color: var(--white);
}


/* =======================================
   استایل نهایی برای پیام‌های فرم (بدون فضای خالی اضافی)
   ======================================= */

/* این کلاس حالا در حالت عادی هیچ ارتفاعی ندارد */
.form-message-placeholder {
    width: 100%;
}

/* خود پیام، استایل و فاصله‌گذاری لازم را ایجاد می‌کند */
.auth-message {
    padding: 12px;
    margin-bottom: 15px; /* این فاصله را فقط زمانی ایجاد می‌کند که پیام وجود دارد */
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    border: 1px solid transparent;
    animation: fadeInUp 0.4s ease;
}

.auth-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.auth-message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}


.header-username {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}


.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #dc3545;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    /* این سه خط مهم هستند */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}


/* استایل برای دکمه بعد از افزودن به سبد خرید */
.add-to-cart-btn-large.btn-added {
    background: #28a745; /* رنگ سبز موفقیت */
    border: 1px solid #28a745;
    cursor: pointer; /* یا 'default' اگر نمی‌خواهید لینک باشد */
}

/* برای اینکه وقتی لینک شد، خط زیرش نداشته باشه */
.add-to-cart-btn-large.btn-added:hover {
    text-decoration: none;
    background: #218838; /* کمی تیره‌تر در هاور */
    color: white;
}
.cart-actions {
    margin-top: 20px;
    text-align: left;
}



/* =======================================
   حذف فلش‌های پیش‌فرض از اینپوت عددی
   ======================================= */

/* برای مرورگرهای Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* برای مرورگر Firefox */
input[type=number] {
  -moz-appearance: textfield;
}


/* =======================================
   استایل برای اسلایدر قیمت داخلی (بدون کتابخانه)
   ======================================= */
.price-slider-container {
    position: relative;
    height: 30px;
    margin: 20px 0;
}

/* استایل هر دو اینپوت range */
.price-slider-container input[type="range"] {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none; /* مهم: فقط دستگیره قابل کلیک باشد */
    z-index: 3;
}
.price-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: all; /* دستگیره را قابل کلیک می‌کند */
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color-primary);
    cursor: grab;
    border: 3px solid var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.price-slider-container input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--accent-color-primary);
    cursor: grab;
    border: 3px solid var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.price-slider-container input[type="range"]:active::-webkit-slider-thumb {
    cursor: grabbing;
}

/* نوار پس‌زمینه اسلایدر */
.slider-track {
    position: absolute;
    top: 13px;
    left: 0;
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background-color: #e0e0e0;
    z-index: 1;
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #6c757d;
    direction: ltr;
}


.remove-coupon-link {
    font-size: 0.8rem;
    color: #dc3545;
    margin-right: 8px;
    font-weight: normal;
}
.remove-coupon-link:hover {
    text-decoration: underline;
}




/* =======================================
   طراحی جدید و شیک برای صفحه تخفیف‌ها
   ======================================= */
.discounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}
.discount-card-wrapper {
    background-color: var(--white);
    border-radius: var(--border-radius-soft);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.discount-card-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.discount-card-header {
    background: var(--gradient);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.discount-value {
    font-size: 1.1rem;
    font-weight: 500;
}
.discount-value span {
    font-size: 2rem;
    font-weight: 800;
    margin-left: 5px;
}
.discount-code {
    background-color: rgba(255,255,255,0.15);
    padding: 8px 15px;
    border-radius: var(--border-radius-pill);
    font-size: 0.9rem;
}
.discount-code strong {
    font-weight: 700;
    letter-spacing: 1px;
}
.discount-products-list {
    padding: 25px;
}
.discount-products-list p {
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--dark-gray);
}
.product-grid-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.mini-product-item {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #eee;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}
.mini-product-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mini-product-item:hover {
    transform: scale(1.1);
    border-color: var(--accent-color-primary);
}



/* استایل برای دکمه کپی کد تخفیف */
.discount-code {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255,255,255,0.15);
    padding: 8px 8px 8px 15px; /* پدینگ راست رو برای دکمه کم کردیم */
    border-radius: var(--border-radius-pill);
}

.copy-code-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.copy-code-btn:hover {
    background: rgba(255,255,255,0.4);
}

.copy-code-btn.copied {
    background-color: #28a745; /* سبز شدن بعد از کپی */
}


/* استایل سفارشی برای Select2 */
.select2-container--default .select2-selection--single {
    height: 48px !important;
    border: 1px solid #ced4da !important;
    border-radius: 8px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px !important;
    padding-right: 12px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    left: 10px !important;
}
.select2-dropdown {
    border: 1px solid #ced4da !important;
    border-radius: 8px !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 5px;
    border: 1px solid #ced4da;
}



/* =======================================
   ریسپانسیو کردن جدول سفارشات در صفحه حساب کاربری
   ======================================= */
@media (max-width: 768px) {
    /* ... کدهای ریسپانسیو قبلی شما ... */

    /* این کد جدید را اضافه کنید */
    .orders-table thead {
        display: none; /* مخفی کردن سرتیترهای جدول */
    }

    .orders-table, .orders-table tbody, .orders-table tr, .orders-table td {
        display: block;
        width: 100%;
    }

    .orders-table tr {
        margin-bottom: 20px;
        border: 1px solid #e9ecef;
        border-radius: var(--border-radius-soft);
        padding: 15px;
    }
    .orders-table tr:last-child {
        margin-bottom: 0;
    }

    .orders-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 10px 0;
        border: none;
    }
    .orders-table td:before {
        content: attr(data-label);
        font-weight: 500;
        text-align: right;
        padding-left: 15px;
        color: var(--dark-gray);
    }
}
.alert { padding: 15px; margin-bottom: 20px; border-radius: 5px; }
.alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
/* =======================================
   اصلاح چیدمان باکس تعداد در حالت موبایل
   ======================================= */
@media (max-width: 576px) {
    /* ... کدهای ریسپانسیو قبلی شما ... */

    /* این کد جدید را اضافه کنید */
    
    /* اول، به کانتینر اصلی می‌گوییم که آیتم‌ها را در مرکز قرار دهد */
    .actions-box {
        align-items: center;
    }
    
    /* حالا به خود باکس تعداد عرض کامل می‌دهیم تا در مرکز قرار بگیرد */
    .quantity-selector {
        width: 100%;
        max-width: 250px; /* یک حداکثر عرض برای زیبایی */
        justify-content: space-between; /* دکمه‌ها و اینپوت را پخش می‌کند */
        margin: 0 auto 15px auto; /* این خط آن را در مرکز قرار می‌دهد و از پایین فاصله ایجاد می‌کند */
    }

    .quantity-selector input {
        flex-grow: 1; /* به اینپوت اجازه می‌دهد فضای خالی را پر کند */
    }
}

/* =======================================
   بزرگ‌تر کردن دکمه افزودن به سبد در موبایل
   ======================================= */
@media (max-width: 576px) {
    /* ... کدهای ریسپانسیو قبلی شما ... */

    /* این کد جدید را اضافه کنید */
    .add-to-cart-btn-large {
        width: 100%; /* عرض دکمه را کامل می‌کند */
        padding: 18px; /* ارتفاع دکمه را بیشتر می‌کند */
        font-size: 1.1rem; /* فونت متن دکمه را کمی بزرگتر می‌کند */
    }
}

/* =======================================
   بهبود استایل ریسپانسیو صفحه جزئیات محصول
   ======================================= */
@media (max-width: 992px) {
    /* ... کدهای ریسپانسیو قبلی شما ... */

    /* استایل‌های جدید برای product-details.php */
    
    /* چیدمان کلی را به تک ستونه تغییر می‌دهیم (این از قبل بود) */
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 30px; /* فاصله بین گالری و اطلاعات را کم می‌کنیم */
    }
    
    .product-gallery {
        position: static;
    }
    
    /* ظاهر بهتر برای گالری تصاویر کوچک */
    .thumbnail-container {
        justify-content: center; /* تصاویر کوچک در مرکز قرار می‌گیرند */
        flex-wrap: wrap; /* اگر تعداد زیاد بود، به خط بعدی بروند */
    }
    .thumbnail {
        width: 60px; /* کمی کوچکتر کردن تصاویر */
        height: 60px;
    }
    
    /* وسط‌چین کردن اطلاعات محصول */
    .product-info-details {
        text-align: center;
    }
    
    .product-title-large {
        font-size: 1.8rem; /* کمی کوچکتر کردن عنوان برای موبایل */
    }
    
    .stock-status {
        margin: 0 auto 15px auto; /* در مرکز قرار می‌گیرد */
        display: inline-block;
    }

    /* وسط‌چین کردن ویژگی‌های متغیر */
    .product-variations {
        grid-template-columns: 1fr; /* تک ستونه شدن دراپ‌دان‌ها */
        max-width: 350px; /* یک حداکثر عرض برای زیبایی */
        margin-left: auto;
        margin-right: auto;
    }
    
    /* وسط‌چین کردن دکمه‌ها و باکس تعداد */
    .actions-box {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    .quantity-selector {
        width: 100%;
        max-width: 250px;
        margin-bottom: 15px;
    }
    .add-to-cart-btn-large {
        width: 100%;
        max-width: 350px;
    }
    
    .product-meta {
        margin-top: 20px;
    }

    /* ظاهر بهتر برای تب‌ها در موبایل */
    .tab-buttons {
        justify-content: center;
        gap: 0;
    }
    .tab-btn {
        flex-grow: 1; /* هر دکمه نصف فضا را می‌گیرد */
        padding: 12px 10px;
        font-size: 1rem;
    }
}

/* =======================================
   استایل خفن و جدید برای تب‌های محصول در حالت ریسپانسیو
   ======================================= */

@media (max-width: 768px) {
    /* ... کدهای ریسپانسیو قبلی شما ... */

    /* این کدهای جدید را اضافه کنید */

    /* ۱. کانتینر اصلی دکمه‌ها */
    .tab-buttons {
        display: flex; /* دکمه‌ها را کنار هم می‌چیند */
        gap: 0; /* فاصله بین دکمه‌ها را حذف می‌کند */
        background-color: #e9ecef; /* یک پس‌زمینه ملایم برای کل کنترل */
        padding: 5px;
        border-radius: var(--border-radius-pill); /* گرد کردن کل کنترل */
        border-bottom: none; /* حذف خط زیرین پیش‌فرض */
        margin-bottom: 25px;
    }

    /* ۲. استایل هر دکمه به صورت جداگانه */
    .tab-btn {
        flex-grow: 1; /* هر دکمه به اندازه مساوی فضا اشغال می‌کند */
        text-align: center;
        padding: 12px 10px;
        border-radius: var(--border-radius-pill); /* گرد کردن هر دکمه */
        border-bottom: none; /* حذف خط زیرین پیش‌فرض */
        transform: none; /* حذف افکت translateY پیش‌فرض */
        font-weight: 500;
        color: #6c757d; /* رنگ متن برای دکمه غیرفعال */
        transition: all 0.3s ease;
    }

    /* ۳. حذف خط زیرین (::after) در حالت موبایل */
    .tab-btn::after {
        display: none;
    }

    /* ۴. استایل دکمه فعال (این بخش جادوی اصلی است) */
    .tab-btn.active {
        background-color: var(--white); /* پس‌زمینه سفید برای دکمه فعال */
        color: var(--accent-color-primary); /* استفاده از رنگ اصلی تم */
        font-weight: 700;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1); /* یک سایه ملایم برای برجستگی */
    }
}



/* ======================= Product Variations (Dropdown Style) ======================= */
.product-variations {
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: 1fr 1fr; /* دو ستون برای دراپ‌دان‌ها */
    gap: 20px;
}
.product-variations .form-group {
    margin-bottom: 0; /* حذف فاصله اضافی */
}
.product-variations .form-group label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark-gray);
    display: block;
    margin-bottom: 8px;
}
/* استفاده مجدد از استایل .custom-select برای یکپارچگی */
.variation-select {
    width: 100%;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 576px) {
    .product-variations {
        grid-template-columns: 1fr; /* در موبایل زیر هم قرار بگیرند */
        gap: 15px;
    }
}

/* Styles for Contact Page Map */
.map-wrapper {
    width: 100%; /* عرض کامل نسبت به ستونی که در آن قرار دارد */
    max-width: 500px; /* حداکثر عرض نقشه، که باعث میشود خیلی بزرگ نشود */
    height: 280px;  /* <<< ارتفاع نقشه، این عدد را برای تنظیم اندازه تغییر بده */
    border-radius: 12px; /* گوشه‌های گرد، برای زیبایی */
    overflow: hidden; /* این خط باعث میشود گوشه‌های خود نقشه هم گرد شوند */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* یک سایه ملایم برای زیبایی */
    margin-top: 20px; /* کمی فاصله از بالا */
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0; /* حذف هرگونه حاشیه */
}



/* ======================= Status Page Styles ======================= */
.status-box {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px 30px;
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
}
.status-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    line-height: 1;
}
.status-box.error-box .status-icon { color: #dc3545; }
.status-box.success-box .status-icon { color: #28a745; }
.status-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}
.status-message {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
}
.status-box .cta-button {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 500;
}



/* =======================================
   استایل‌های جدید برای قالب صفحه مقاله (Post Template)
   ======================================= */
.post-single .post-container {
    max-width: 850px; /* عرض محتوای مقاله رو محدود می‌کنه تا خواناتر باشه */
    margin: 0 auto;
}

.post-main-image {
    width: 100%;
    height: auto;
    border-radius: 16px; /* گوشه‌های نرم‌تر */
    margin-bottom: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.post-single h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--dark-gray);
    line-height: 1.5;
    margin-bottom: 20px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}
.post-meta i {
    color: var(--accent-color-primary);
}

.post-content {
    font-size: 1.1rem;
    line-height: 2.2;
    color: #343a40;
}

.post-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 20px;
    padding-right: 15px;
    border-right: 4px solid var(--accent-color-primary);
}

.post-content p {
    margin-bottom: 25px;
}

.post-content ul,
.post-content ol {
    margin-right: 20px;
    margin-bottom: 25px;
}
.post-content li {
    margin-bottom: 10px;
}

.post-inline-image {
    width: 100%;
    border-radius: 12px;
    margin: 30px 0;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .post-single h1 {
        font-size: 2rem;
    }
    .post-content h2 {
        font-size: 1.5rem;
    }
}

/* =======================================
   استایل‌های جدید و جذاب برای قالب مقاله
   ======================================= */

/* هدر سینمایی مقاله */
.post-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 40px 0;
}
.post-hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}
.post-hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2));
    z-index: 2;
}
.post-hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: 0 auto;
}
.post-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 20px rgba(0,0,0,0.7);
    margin-bottom: 20px;
}
.post-hero .post-meta {
    font-size: 1rem;
    opacity: 0.9;
    display: flex;
    justify-content: center;
    gap: 25px;
}
.post-hero .post-meta i { margin-left: 8px; }

/* چیدمان محتوا و سایدبار */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 300px; /* ستون اصلی و سایدبار */
    gap: 50px;
    align-items: flex-start;
}
/* محتوای اصلی مقاله */
.post-content {
    font-size: 1.1rem;
    line-height: 2.2;
    color: #343a40;
}
.post-content .lead { /* استایل پاراگراف اول */
    font-size: 1.3rem;
    font-weight: 400;
    color: #212529;
    margin-bottom: 30px;
}
.post-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}
.post-content p { margin-bottom: 25px; }
.post-content ul, .post-content ol { margin: 0 25px 25px 0; }
.post-content li { margin-bottom: 10px; }
.post-inline-image {
    width: 100%;
    border-radius: 12px;
    margin: 30px 0;
}

/* سایدبار شناور */
.post-sidebar {
    position: sticky;
    top: 120px; /* فاصله از بالای صفحه */
}
.toc-widget {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
}
.toc-widget h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}
.toc-widget h4 i { margin-left: 10px; }
.toc-widget ul { list-style: none; }
.toc-widget li a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s;
}
.toc-widget li a:hover {
    background-color: #e9ecef;
    color: var(--dark-gray);
}

/* ریسپانسیو */
@media (max-width: 992px) {
    .post-layout {
        grid-template-columns: 1fr; /* سایدبار زیر محتوا میاد */
    }
    .post-sidebar {
        position: static; /* شناور بودن رو غیرفعال می‌کنیم */
        margin-top: 50px;
    }
    .post-hero h1 { font-size: 2.5rem; }
}

/* =======================================
   استایل‌های شیک و منطقی برای قالب مقاله
   ======================================= */

.post-single-simple .post-container-simple {
    max-width: 900px; /* عرض محتوا رو برای خوانایی بهتر محدود می‌کنیم */
    margin: 0 auto;
}

.post-main-image-simple {
    width: 100%;
    height: auto;
    border-radius: 16px; /* همان گوشه‌های گرد و نرم */
    margin-bottom: 50px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.post-content-simple {
    background-color: #fff; /* یک پس‌زمینه سفید تمیز برای متن */
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.post-content-simple .lead { /* استایل پاراگراف اول */
    font-size: 1.25rem;
    color: #495057;
    line-height: 2;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.post-content-simple {
    font-size: 1.1rem;
    line-height: 2.2;
    color: #343a40;
}

.post-content-simple h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-top: 40px;
    margin-bottom: 20px;
}
.post-content-simple h2:first-of-type {
    margin-top: 0;
}

.post-content-simple p {
    margin-bottom: 25px;
}

.post-content-simple ul,
.post-content-simple ol {
    margin-right: 25px;
    margin-bottom: 25px;
    padding-right: 0;
}

.post-content-simple li {
    margin-bottom: 12px;
}

.post-content-simple img.post-inline-image {
    width: 100%;
    border-radius: 12px;
    margin: 30px 0;
}
/* =======================================
   استایل نهایی و سئو-محور برای قالب مقاله
   ======================================= */

.post-single-simple .post-container-simple {
    max-width: 900px;
    margin: 0 auto;
}
.post-main-image-simple {
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin-bottom: 50px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}
.post-content-simple {
    background-color: #fff;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}
.post-content-simple .lead {
    font-size: 1.25rem;
    color: #495057;
    line-height: 2;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}
.post-content-simple {
    font-size: 1.1rem;
    line-height: 2.3;
    color: #343a40;
}
.post-content-simple h2 {
    font-size: 1.9rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 25px;
}

/* باکس فراخوان به اقدام (Call to Action) */
.post-cta-box {
    margin-top: 60px;
    border-radius: 16px;
    padding: 40px;
    background-color: var(--dark-gray);
    background-image: linear-gradient(135deg, var(--dark-gray) 0%, #34495e 100%);
    color: #fff;
    text-align: center;
}

.post-cta-box h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.post-cta-box p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto 30px auto;
    line-height: 1.9;
}

.post-cta-box .cta-button {
    padding: 15px 40px;
    font-size: 1.1rem;
}
.post-cta-box .cta-button i {
    transition: transform 0.3s ease;
    margin-right: 8px; /* فاصله آیکون از متن */
}
.post-cta-box .cta-button:hover i {
    transform: scale(1.2) rotate(-15deg); /* افکت باحال برای آیکون */
}
/* ====================================================== */
/*      استایل برای پیام‌های موفقیت و خطا (Alerts)      */
/* ====================================================== */
.alert {
    padding: 15px 20px;
    margin-bottom: 25px;
    border: 1px solid transparent;
    border-radius: var(--border-radius-soft);
    font-weight: 500;
    line-height: 1.8;
}
.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}
.alert-error {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}
/* =================================================================== */
/*      رفع نهایی مشکل حرکت دکمه با افزایش اولویت (Specificity)      */
/* =================================================================== */

/* این کد فقط روی صفحه‌هایی با عرض کمتر از 992 پیکسل اعمال میشه */
@media (max-width: 992px) {

    /* ما با اضافه کردن کلاس .product-grid، اولویت این استایل رو بالا میبریم */
    .product-grid .product-card-link .product-info {
        text-align: center;
        transform: none !important; /* انیمیشن بالا رفتن رو غیرفعال میکنه */
    }

    /* اینجا هم با افزایش اولویت، مطمئن میشیم که دکمه ثابت میمونه */
    .product-grid .product-card-link .view-details-btn {
        position: static !important;
        transform: none !important;      /* هر نوع انیمیشن حرکتی رو حذف میکنه و مشکل اصلی رو حل میکنه */
        opacity: 1 !important;           /* دکمه رو همیشه قابل مشاهده میکنه */
        display: inline-block !important;
        margin-top: 15px !important;
    }
}
/* ================================================================ */
/*  بخش نهایی: نمایش ثابت عنوان دسته‌بندی در موبایل
/* ================================================================ */
@media (max-width: 992px) {
    .category-overlay h3 {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =======================================
   استایل‌های نهایی و حرفه‌ای برای قالب مقاله (با ریسپانسیو پاپ‌آپ)
   ======================================= */

/* هدر سینمایی مقاله (بدون تغییر) */
.post-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 60px 0;
}
.post-hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; z-index: 1;
}
.post-hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 100%);
    z-index: 2;
}
.post-hero-content {
    position: relative; z-index: 3; max-width: 900px; margin: 0 auto;
}
.post-hero h1 {
    font-size: 3rem; font-weight: 800; text-shadow: 2px 2px 20px rgba(0,0,0,0.7);
    margin-bottom: 20px; line-height: 1.5;
}
.post-hero .post-meta {
    font-size: 0.95rem; opacity: 0.9; display: flex;
    justify-content: center; gap: 25px; flex-wrap: wrap;
}
.post-hero .post-meta i { margin-left: 8px; }

/* چیدمان محتوا و سایدبار (دسکتاپ) */
.post-layout {
    display: grid; grid-template-columns: 1fr 300px;
    gap: 50px; align-items: flex-start;
}
.post-content {
    font-size: 1.1rem; line-height: 2.2; color: #343a40;
}
.post-content .lead {
    font-size: 1.25rem; font-weight: 400; color: #212529;
    margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid #f0f0f0;
}
.post-content h2 {
    font-size: 1.9rem; font-weight: 700; color: var(--dark-gray);
    margin-top: 50px; margin-bottom: 25px; padding-top: 15px; border-top: 2px solid #f0f0f0;
}
.post-content p { margin-bottom: 25px; }
.post-content ul { list-style-type: none; padding-right: 20px; }
.post-content ul li { margin-bottom: 15px; position: relative; }
.post-content ul li::before {
    content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    color: var(--accent-color-primary); position: absolute; right: -25px; top: 5px;
}
.post-content img.post-inline-image {
    width: 100%; border-radius: 12px; margin: 30px 0;
}

/* سایدبار (دسکتاپ) */
.post-sidebar { position: sticky; top: 120px; }
.toc-widget {
    background-color: #f8f9fa; border-radius: 12px;
    padding: 25px; border: 1px solid #e9ecef;
}
.toc-widget h4 {
    font-size: 1.2rem; font-weight: 700; margin-bottom: 20px;
    padding-bottom: 15px; border-bottom: 1px solid #dee2e6;
}
.toc-widget h4 i { margin-left: 10px; }
.toc-widget ul { list-style: none; padding: 0; }
.toc-widget li a {
    display: block; padding: 10px 15px; border-radius: 8px;
    color: #495057; text-decoration: none; transition: all 0.2s; font-weight: 500;
}
.toc-widget li a:hover, .toc-widget li a.active {
    background-color: var(--accent-color-primary); color: var(--white); transform: translateX(-5px);
}
.post-cta-box {
    margin-top: 60px; border-radius: 16px; padding: 40px;
    background: linear-gradient(135deg, var(--dark-gray) 0%, #34495e 100%);
    color: #fff; text-align: center;
}
.post-cta-box h3 { font-size: 2rem; font-weight: 700; margin-bottom: 15px; }
.post-cta-box p {
    font-size: 1.1rem; color: rgba(255,255,255,0.8); max-width: 600px;
    margin: 0 auto 30px auto; line-height: 1.9;
}

/* ===================================================================
   استایل‌های نهایی و حرفه‌ای برای قالب مقاله (با ریسپانسیو پاپ‌آپ)
   =================================================================== */

/* ۱. هدر سینمایی مقاله */
.post-hero {
    position: relative;
    height: 60vh;
    min-height: 450px; /* کمی ارتفاع بیشتر برای جای‌گیری بهتر متن */
    display: flex;
    align-items: flex-end; /* متن رو به پایین می‌چسبونه */
    justify-content: center;
    text-align: center;
    color: #ffffff;
    padding: 60px 0;
}
.post-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}
.post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* این خط اصلی‌ترین تغییره: گرادینت از پایین تا بالا، تیره‌تر شده */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.7) 40%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 2;
}
.post-hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: 0 auto;
}
.post-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    /* این سایه متن رو از پس‌زمینه جدا می‌کنه و خواناییش رو تضمین می‌کنه */
    text-shadow: 0px 2px 10px rgba(0, 0, 0, 0.9);
    margin-bottom: 20px;
    line-height: 1.5;
}
.post-hero .post-meta {
    font-size: 0.95rem;
    opacity: 0.95; /* کمی واضح‌تر برای خوانایی بهتر */
    text-shadow: 0px 1px 4px rgba(0, 0, 0, 1); /* سایه ملایم برای متادیتا */
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}
.post-hero .post-meta i {
    margin-left: 8px;
}

/* ۲. چیدمان محتوا و سایدبار (دسکتاپ) */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    align-items: flex-start;
}
.post-content {
    font-size: 1.1rem;
    line-height: 2.2;
    color: #343a40;
}
.post-content .lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: #212529;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}
.post-content h2 {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-top: 50px;
    margin-bottom: 25px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}
.post-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    margin-top: 30px;
    margin-bottom: 15px;
}
.post-content p {
    margin-bottom: 25px;
}
.post-content ul {
    list-style-type: none;
    padding-right: 20px;
}
.post-content ul li {
    margin-bottom: 15px;
    position: relative;
}
.post-content ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent-color-primary);
    position: absolute;
    right: -25px;
    top: 5px;
}

/* ۳. سایدبار (دسکتاپ) */
.post-sidebar {
    position: sticky;
    top: 120px;
}
.toc-widget {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
}
.toc-widget h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}
.toc-widget h4 i {
    margin-left: 10px;
}
.toc-widget ul {
    list-style: none;
    padding: 0;
}
.toc-widget li a {
    display: block;
    padding: 10px 15px;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}
.toc-widget li a:hover,
.toc-widget li a.active {
    background-color: var(--accent-color-primary);
    color: var(--white);
    transform: translateX(-5px);
}
.post-cta-box {
    margin-top: 60px;
    border-radius: 16px;
    padding: 40px;
    background: linear-gradient(135deg, var(--dark-gray) 0%, #34495e 100%);
    color: #fff;
    text-align: center;
}
.post-cta-box h3 {
    font-size: 2.2rem; /* کمی بزرگتر برای تاکید بیشتر */
    font-weight: 800;  /* کمی ضخیم‌تر */
    margin-bottom: 20px; /* فاصله بیشتر از متن پایینی */
    color: #ffffff;    /* <<<<< این خط اصلی‌ترین تغییره: رنگ متن رو سفید خالص می‌کنه >>>>> */
    opacity: 0.9;      /* یه شفافیت خیلی کم بهش میدیم که شیک‌تر بشه */
}
.post-cta-box p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 30px auto;
    line-height: 1.9;
}

/* ۴. استایل دکمه شناور و پاپ‌آپ (فقط برای موبایل) */
.toc-mobile-container {
    display: none;
}
.toc-fab {
    position: fixed;
    bottom: 20px;
    right: 20px; /* جای دکمه به راست منتقل شد */
    z-index: 999;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-pill);
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}
.toc-fab i {
    margin-left: 8px;
}
.toc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
.toc-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.toc-modal-box {
    background-color: var(--white);
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.toc-modal-overlay.active .toc-modal-box {
    transform: translateY(0);
}
.toc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.toc-modal-header h4 {
    font-size: 1.3rem;
    margin: 0;
}
.toc-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6c757d;
}
.toc-modal-content ul {
    list-style: none;
    padding: 0;
}
.toc-modal-content li a {
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    color: #343a40;
}

/* ۵. ریسپانسیو نهایی */
@media (max-width: 992px) {
    .post-layout {
        grid-template-columns: 1fr;
    }
    .post-sidebar {
        display: none;
    }
    .toc-mobile-container {
        display: block;
    }
    .post-hero h1 {
        font-size: 2.2rem;
    }
}
@media (max-width: 576px) {
    .post-hero {
        height: auto;
        min-height: 350px;
    }
    .post-hero h1 {
        font-size: 1.8rem;
    }
    .post-content h2 {
        font-size: 1.6rem;
    }
}

/* ==========================================================
   کد انیمیشن Fade-in ساده برای لود شدن صفحه
   ========================================================== */
.animate-on-load {
    opacity: 0;
    /* این خط، انیمیشن نرم برای ظاهر شدن رو تعریف می‌کنه */
    transition: opacity 0.8s ease-in-out;
}


























/* ==========================================================
   استایل نهایی، قوی و کاملاً ریسپانسیو برای جدول مقاله
   ========================================================== */

/* استایل برای دسکتاپ (با اولویت بالا) */
.post-content .table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 40px 0;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.post-content .comparison-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 0.95rem;
    overflow: hidden; 
}
.post-content .comparison-table th, 
.post-content .comparison-table td {
    padding: 18px 15px; /* کمی پدینگ بیشتر برای خوانایی */
    vertical-align: middle;
    border: none; /* حذف بوردرهای داخلی برای ظاهر تمیزتر */
}
.post-content .comparison-table thead {
    background-color: var(--dark-gray);
    color: var(--white);
    font-size: 1.1rem;
}
.post-content .comparison-table tbody tr {
    border-bottom: 1px solid #dee2e6;
}
.post-content .comparison-table tbody tr:last-child {
    border-bottom: none;
}
.post-content .comparison-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}
.post-content .comparison-table td:first-child {
    font-weight: 700;
    text-align: right;
}

/* استایل برای موبایل و تبلت (با اولویت بالا) */
@media (max-width: 768px) {
    .post-content .table-responsive {
        border: none; /* در موبایل بوردر کانتینر رو برمیداریم */
        box-shadow: none;
        margin: 30px 0;
    }
    .post-content .comparison-table thead {
        display: none; 
    }
    .post-content .comparison-table, 
    .post-content .comparison-table tbody, 
    .post-content .comparison-table tr, 
    .post-content .comparison-table td {
        display: block;
        width: 100%;
        text-align: right; 
    }
    .post-content .comparison-table tr {
        margin-bottom: 20px;
        border: 1px solid #dee2e6;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.07);
        overflow: hidden;
    }
    .post-content .comparison-table td {
        display: flex;
        justify-content: space-between; 
        align-items: center;
        padding: 15px;
        text-align: left;
        border-bottom: 1px dashed #e9ecef;
    }
    .post-content .comparison-table tr td:last-child {
        border-bottom: none;
    }
    .post-content .comparison-table td:before {
        content: attr(data-label);
        font-weight: 700;
        padding-left: 15px;
        color: var(--dark-gray);
        text-align: right;
    }
    .post-content .comparison-table td:first-child {
        background-color: #f1f3f5;
        font-size: 1.1rem;
        padding: 15px;
        justify-content: center; 
        text-align: center;
        border-bottom: 1px solid #dee2e6;
    }
     .post-content .comparison-table td:first-child:before {
         display: none; 
     }
}
















/* =======================================
   ۱. افکت "نفس کشیدن" برای دکمه‌های اصلی
   ======================================= */
@keyframes breathing-button {
    0% { transform: scale(1); box-shadow: 0 8px 15px rgba(52, 152, 219, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 12px 25px rgba(52, 152, 219, 0.4); }
    100% { transform: scale(1); box-shadow: 0 8px 15px rgba(52, 152, 219, 0.3); }
}

/* این افکت رو به دکمه‌های اصلی اعمال می‌کنیم */
.cta-button {
    animation: breathing-button 3s ease-in-out infinite;
}

/* افکت هاور رو هم قوی‌تر می‌کنیم تا با انیمیشن تداخل نکنه */
.cta-button:hover {
    animation-play-state: paused; /* انیمیشن رو موقع هاور متوقف می‌کنه */
    transform: translateY(-3px) scale(1.08); /* کمی بیشتر بزرگ می‌شه */
}

/* =======================================
   ۲. افکت شناور برای آیکون‌های ویژگی‌ها
   ======================================= */
@keyframes floating-icon {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* این افکت رو به آیکون‌ها اعمال می‌کنیم */
.feature-item i {
    animation: floating-icon 4s ease-in-out infinite;
}

/* برای اینکه هر آیکون با تاخیر شروع به حرکت کنه و رقصشون هماهنگ نباشه */
.feature-item:nth-child(2) i {
    animation-delay: 0.5s;
}
.feature-item:nth-child(3) i {
    animation-delay: 1s;
}




/* ===================================================================== */
/*  کد نهایی و قطعی: درخشش + خط نورانی (با حرکت تضمینی از راست به چپ)
/* ===================================================================== */

/* ۱. استایل اصلی H1 */
.hero-content h1 {
    position: relative;
    overflow: hidden;
    color: #f0f0f0;
    padding-bottom: 15px;
    
    /* افکت اصلی ماسک روی خود h1 */
    -webkit-mask-image: linear-gradient(-75deg, rgba(0,0,0,.6) 30%, #000 50%, rgba(0,0,0,.6) 70%);
    -webkit-mask-size: 200% 100%;
    
    /* استفاده از انیمیشن جدید */
    animation: final-shine-rtl 4s infinite;
    animation-delay: 2s;
}

/* ۲. خط نورانی متحرک زیر متن */
.hero-content h1::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffffff; 
    
    /* استفاده از همون ماسک */
    -webkit-mask-image: linear-gradient(-75deg, rgba(0,0,0,.6) 30%, #000 50%, rgba(0,0,0,.6) 70%);
    -webkit-mask-size: 200% 100%;
    
    /* استفاده از همون انیمیشن جدید */
    animation: final-shine-rtl 4s infinite;
    animation-delay: 2s; 
}

/* ۳. تعریف انیمیشن برای حرکت از راست به چپ (اصلاح شده) */
@keyframes final-shine-rtl {
    0% {
        /* شروع از چپِ چپ (درخشش در سمت راست و خارج از دید است) */
        -webkit-mask-position: -50% 0;
    }
    100% {
        /* پایان در راستِ راست (درخشش از سمت چپ خارج شده است) */
        -webkit-mask-position: 150% 0;
    }
}

/* =======================================
   اصلاح فاصله بین بخش محصولات و وبلاگ
   ======================================= */
.blog-promo-section {
    padding-top: 5px; /* فاصله بالایی این بخش را کم می‌کند */
}










/* ================================================== */
/*   استایل نهایی و حرفه‌ای برای کردیت طراح سایت       */
/* ================================================== */

.site-credit {
    width: 100%;
    text-align: center;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08); /* خط جداکننده خیلی محو */
}

.site-credit p {
    margin: 0;
}

.site-credit a {
    display: inline-flex; /* برای اینکه آیکون و متن کنار هم قرار بگیرن */
    align-items: center;
    gap: 8px; /* فاصله بین آیکون و متن */
    font-size: 0.85rem; /* فونت ریز و ظریف */
    color: #a8b2d1; /* رنگ ملایم برای متن */
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.site-credit a:hover {
    color: #fff; /* با هاور، متن سفید و درخشان میشه */
    transform: translateY(-2px); /* یه افکت کوچیک حرکت به بالا */
}

.site-credit a i {
    font-size: 1rem; /* اندازه آیکون */
    color: #00bcd4; /* رنگ فیروزه‌ای جذاب برای آیکون */
}

.site-credit a strong {
    font-weight: 600; /* اسم برندت رو برجسته می‌کنه */
    color: #fff;
}














/* ========================================================
   نسخه نهایی و کمپکت برای فوتر (با بخش کردیت طراح)
   ======================================================== */

.site-footer-main {
    background-color: var(--dark-gray);
    color: #bdc3c7;
    padding: 60px 0 25px 0; /* فاصله بالا و پایین کمتر شد */
    position: relative;
    line-height: 1.8;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    justify-content: center;
    gap: 50px; /* فاصله بین ستون‌ها کمی کمتر شد */
    padding-bottom: 40px; /* فاصله از بخش پایینی کمتر شد */
}

.footer-column h4,
.footer-logo {
    font-size: 1.2rem; /* فونت عنوان کمی کوچکتر شد */
    font-weight: 700;
    margin-bottom: 20px; /* فاصله از لینک‌های زیرین کمتر شد */
    color: var(--white);
    position: relative;
    padding-bottom: 8px; /* فاصله از خط زیرین کمتر شد */
}

.footer-column h4::after,
.footer-logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color-primary);
    border-radius: 2px;
}

.footer-column.links ul {
    padding-right: 0;
}
.footer-column.links a {
    display: inline-block;
    transition: color 0.3s, transform 0.3s;
}
.footer-column.links a:hover {
    color: var(--white);
    transform: translateX(-8px);
}

.social-icons {
    margin-top: 20px; /* فاصله از متن بالا کمتر شد */
    display: flex;
    gap: 12px; /* فاصله بین آیکون‌ها کمتر شد */
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;  /* اندازه دکمه کمی کوچکتر شد */
    height: 40px; /* اندازه دکمه کمی کوچکتر شد */
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: #bdc3c7;
    font-size: 1.1rem; /* اندازه آیکون کمی کوچکتر شد */
    transition: all 0.3s ease-in-out;
}

.social-icons a:hover {
    background-color: var(--accent-color-primary);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* فاصله بین کپی‌رایت و اینماد کمتر شد */
    padding-top: 25px; /* فاصله از خط جداکننده کمتر شد */
    border-top: 1px solid #4a637c;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* === بخش کردیت طراح سایت (نسخه کمپکت) === */
.site-credit {
    width: 100%;
    text-align: center;
    padding-top: 20px; /* فاصله کمتر */
    margin-top: 20px;  /* فاصله کمتر */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-credit p {
    margin: 0;
}

.site-credit a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem; /* فونت کمی ریزتر و ظریف‌تر */
    color: #a8b2d1;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.site-credit a:hover {
    color: #fff;
    transform: translateY(-2px);
}

.site-credit a i {
    font-size: 1rem;
    color: #00bcd4;
}

.site-credit a strong {
    font-weight: 600;
    color: #fff;
}


/* =================================
   بخش ریسپانسیو (بدون تغییر باقی می‌ماند)
   ================================= */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-column h4::after,
    .footer-logo::after {
        right: 50%;
        transform: translateX(50%);
    }

    .footer-column.links a:hover {
        transform: none;
    }

    .social-icons {
        justify-content: center;
    }
}