/* --- متغیرها و تنظیمات پایه --- */
:root {
    --primary-purple: #8e24aa;
    --primary-light: #ab47bc;
    --secondary-green: #00b894;
    --bg-light: #f5f6fa;
    --text-dark: #2d3436;
    --text-grey: #636e72;
    --white: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Category Sidebar Modal (New) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.category-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.category-sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px;
    background: var(--primary-purple);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#closeSidebar {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.sidebar-menu {
    padding: 10px 0;
    overflow-y: auto;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 25px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu li a:hover {
    background: #f9f9f9;
    color: var(--primary-purple);
}

.sidebar-menu li a i {
    width: 25px;
    color: #999;
}

/* --- Header --- */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary-purple);
}

.search-box {
    flex: 1;
    margin: 0 40px;
    position: relative;
    max-width: 600px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.user-actions a {
    margin-right: 15px;
    font-size: 14px;
    color: var(--text-grey);
}

.nav-menu {
    display: flex;
    gap: 20px;
    padding-top: 10px;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    white-space: nowrap;
}

.nav-links a {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-purple);
}

.cat-trigger {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-dark);
}

.cat-trigger:hover {
    color: var(--primary-purple);
}

/* --- Swiper Generic Styles --- */
.main-content {
    margin-top: 20px;
    overflow: hidden;
}

/* Fix for horizontal scroll */
.swiper {
    width: 100%;
    padding-bottom: 30px !important;
}

/* Customizing Swiper Arrows */
.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-purple) !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: bold;
}

.swiper-pagination-bullet-active {
    background: var(--primary-purple) !important;
}

/* --- Hero Slider --- */
.hero-swiper {
    border-radius: var(--border-radius);
    height: 350px;
    background: #f0f0f0;
}

.hero-slide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    background: linear-gradient(90deg, #e8f5e9 0%, #c8e6c9 100%);
    box-sizing: border-box;
}

.slide-2 {
    background: linear-gradient(90deg, #e3f2fd 0%, #bbdefb 100%);
}

/* Different color for slide 2 */

.hero-content h1 {
    font-size: 28px;
    color: #2e7d32;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 16px;
    margin-bottom: 20px;
}

.btn-hero {
    background: var(--primary-purple);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
}

.hero-image img {
    height: 280px;
    object-fit: contain;
}

/* --- Categories Carousel --- */
.categories-section {
    margin: 40px 0;
}

.cat-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cat-item:hover .cat-img {
    transform: translateY(-5px);
    border-color: var(--primary-purple);
}

.cat-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: 0.3s;
}

.cat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Cards Carousel --- */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 20px;
    padding: 0 5px;
}

.section-title h2 {
    font-size: 20px;
    border-right: 4px solid var(--primary-purple);
    padding-right: 10px;
}

.view-all {
    color: var(--primary-purple);
    font-size: 14px;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: 0.3s;
    height: auto;
    position: relative;
    user-select: none;
    /* Prevent text selection while dragging */
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-img {
    height: 160px;
    position: relative;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.card-body {
    padding: 15px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-location {
    font-size: 12px;
    color: var(--text-grey);
    margin-bottom: 10px;
}

.card-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
}

.new-price {
    color: var(--primary-purple);
    font-weight: bold;
    font-size: 16px;
}

/* --- Purple Banner --- */
.purple-banner {
    margin: 40px 0;
    background: linear-gradient(45deg, var(--primary-purple), var(--primary-light));
    border-radius: var(--border-radius);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.purple-banner button {
    background: #ffc107;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
}

/* --- Posters --- */
.posters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.poster-card img {
    border-radius: var(--border-radius);
    width: 100%;
    cursor: pointer;
    transition: 0.3s;
}

/* --- App Section --- */
.app-section {
    background: #fdf5e6;
    padding: 60px 0;
    margin-top: 20px;
}

.app-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-text h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.app-text p {
    color: var(--text-grey);
    margin-bottom: 30px;
}

.app-buttons img {
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
}

.app-image img {
    max-height: 350px;
    transform: rotate(-5deg);
}

.app-image,
.app-text {
    width: 50%;
}

.section-title2 {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-right: 5px solid #8e24aa;
    padding: 5px 15px;

}

/* --- Footer Styles --- */
.main-footer {
    background-color: #fcfcfc;
    border-top: 5px solid #8e24aa; /* نوار بنفش بالای فوتر */
    padding: 60px 0 40px;
    font-family: 'Vazirmatn', sans-serif;
    color: #444;
    direction: rtl;
    text-align: right;
    margin-top: 50px;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

/* --- Column 1: Brand --- */
.brand-col {
    max-width: 350px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center; /* لوگو وسط چین طبق عکس */
    margin-bottom: 20px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background-color: #8e24aa; /* رنگ بنفش لوگو */
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    margin-bottom: 10px;
    position: relative;
}
/* ایجاد دایره سفید کوچک داخل لوگو طبق عکس */
.logo-icon::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.footer-logo h2 {
    color: #8e24aa;
    font-size: 22px;
    margin: 0;
    font-weight: 800;
}

.footer-desc {
    font-size: 13px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
    text-align: center; /* متن توضیحات وسط چین */
}

.footer-address {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    color: #333;
    justify-content: center; /* آدرس وسط چین */
}

.footer-address i {
    color: #666;
    margin-top: 4px;
}

.footer-map img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #ddd;
}

/* --- Column 2: Links --- */
.links-col {
    display: flex;
    flex-direction: column;
    align-items: center; /* وسط چین کردن محتویات ستون وسط */
}

.footer-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-links {
    list-style: none;
    padding: 0;
    text-align: right;
    margin-bottom: 30px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    color: #666;
    font-size: 13px;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #8e24aa;
}

.trust-badges {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.trust-badges img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    border: 1px solid #eee;
    padding: 5px;
    background: #fff;
}

/* --- Column 3: Contact & Apps --- */
.contact-col {
    text-align: right; /* ستون چپ راست‌چین می‌ماند اما در موبایل وسط‌چین می‌شود */
}

.contact-col .footer-title {
    display: block;
    text-align: right;
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
    padding-right: 8px;
    border-right: 5px solid #6b42ce;
}

.app-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.store-btn img {
    height: 35px; /* ارتفاع دکمه‌های دانلود */
    border-radius: 5px;
    transition: 0.3s;
}

.store-btn:hover img {
    opacity: 0.8;
}

.contact-title {
    margin-top: 20px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #333;
    direction: ltr; /* برای نمایش صحیح اعداد تلفن */
    
}

.info-item i {
    color: #999;
    font-size: 14px;
}

.social-media {
    margin-top: 30px;
}

.social-media span {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #666;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-icons a {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 16px;
    transition: 0.3s;
}

.social-icons a:hover {
    border-color: #8e24aa;
    color: #8e24aa;
    background: #fff;
}

/* --- Responsive Design (Mobile & Tablet) --- */
@media (max-width: 992px) {
    .footer-row {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-col, .brand-col {
        max-width: 100%;
        width: 100%;
        min-width: unset;
    }

    .contact-col {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .contact-col .footer-title {
        text-align: center;
    }

    .app-buttons {
        justify-content: center;
    }

    .info-item {
        justify-content: center; /* وسط چین کردن شماره تماس‌ها در موبایل */
    }

    .social-icons {
        justify-content: center;
    }
    
    .footer-address {
        justify-content: center;
    }
}

/* --- Responsive Breakpoints --- */
@media (max-width: 992px) {
    .hero-image {
        display: none;
    }

    .hero-slide {
        justify-content: center;
        text-align: center;
    }

    .posters-grid {
        grid-template-columns: 1fr;
    }

    .app-container {
        flex-direction: column-reverse;
        text-align: center;
    }

    .app-image img {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        width: 100%;
        margin: 0;
    }

    .nav-links {
        display: none;
    }

    /* مخفی کردن لینک‌های هدر در موبایل */
    .hero-swiper {
        height: 250px;
    }

 

    .trust-logos {
        justify-content: center;
    }

    .newsletter {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        width: 100%;
    }

    .newsletter-form input {
        width: 100%;
    }

    .purple-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}