/* ===========================
   style.css - نسخه کامل و نهایی
   فوم شاپ - foam-shop.ir 1
   =========================== */

/* ========== متغیرهای رنگ ========== */
:root {
    --primary-gray: #4a4a4a;
    --dark-gray: #2a2a2a;
    --light-gray: #f5f5f5;
    --primary-purple: #6b5fd9;
    --light-purple: #a8a0ff;
    --dark-purple: #5a4fcf;
    --white: #ffffff;
    --black: #000000;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --shadow-color: rgba(74, 74, 74, 0.1);
    --purple-shadow: rgba(107, 95, 217, 0.25);
}

/* ========== ریست کلی ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Tahoma', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    direction: rtl;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== نوار ناوبری ========== */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 15px var(--shadow-color);
    z-index: 1000;
    border-bottom: 3px solid var(--primary-purple);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    order: 1;
    margin-right: auto;
}

.logo img {
    height: 50px;
    width: auto;
    border-radius: 8px;
}

.logo span {
    color: var(--primary-gray);
    font-size: 1.3rem;
    font-weight: bold;
}

.hamburger {
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1003;
    order: -1;
    padding: 5px;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: var(--primary-purple);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 350px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 100px;
    gap: 25px;
    transition: right 0.4s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    display: flex;
    border-left: 3px solid var(--primary-purple);
}

.nav-menu.active {
    right: 0;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 10px 25px;
    border-radius: 25px;
    transition: all 0.3s;
    width: 80%;
    text-align: right;
}

.nav-menu a:hover {
    background: var(--primary-purple);
    color: var(--white);
    transform: translateX(-5px);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ========== اسلایدر اصلی ========== */
.main-slider {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-gray) 0%, var(--dark-gray) 100%);
    margin-bottom: 50px;
}

.slide {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    padding: 40px 20px;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    color: var(--white);
    z-index: 2;
}

.slide-text {
    flex: 1;
    max-width: 600px;
}

.slide-text h2 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 25px;
    line-height: 1.4;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.slide-text p {
    font-size: 1.2rem;
    line-height: 2;
    margin-bottom: 35px;
    opacity: 0.95;
}

.slide-image {
    flex: 1;
    max-width: 500px;
    text-align: center;
}

.slide-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--primary-purple);
    width: 35px;
    border-radius: 7px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.slider-btn:hover {
    background: var(--primary-purple);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    right: 20px;
}

.slider-btn.next {
    left: 20px;
}
/* اضافه کردن به style.css */
.slider-dots .dot {
    background: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.slider-dots .dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slider-dots .dot:focus-visible {
    outline: 3px solid var(--primary-purple);
    outline-offset: 2px;
}
/* ========== ویژگی‌های بالا ========== */
.top-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: -70px auto 50px;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

.feature-box {
    background: var(--white);
    padding: 30px 25px;
    border-radius: 15px;
    box-shadow: 0 10px 35px var(--shadow-color);
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.feature-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px var(--purple-shadow);
    border-color: var(--primary-purple);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-box h3 {
    color: var(--primary-gray);
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.feature-box p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========== دسته‌بندی‌ها ========== */
.categories-section {
    max-width: 1200px;
    margin: 0 auto 70px;
    padding: 0 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--border-color);
}

.section-header h2 {
    color: var(--primary-gray);
    font-size: 1.9rem;
    position: relative;
    font-weight: bold;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -18px;
    right: 0;
    width: 70px;
    height: 4px;
    background: var(--primary-purple);
    border-radius: 2px;
}

.section-header a {
    color: var(--primary-purple);
    font-weight: bold;
    font-size: 1rem;
    padding: 8px 20px;
    border-radius: 20px;
    border: 2px solid var(--primary-purple);
    transition: all 0.3s;
}

.section-header a:hover {
    background: var(--primary-purple);
    color: var(--white);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.category-card {
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
    border-radius: 15px;
    padding: 35px 15px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.category-card:hover {
    border-color: var(--primary-purple);
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--purple-shadow);
}

.category-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.category-card h3 {
    color: var(--primary-gray);
    font-size: 1rem;
    margin-bottom: 5px;
    font-weight: bold;
}

.category-card span {
    color: #555;
    font-size: 0.85rem;
}

/* ========== محصولات محبوب ========== */
.popular-products {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--light-purple) 100%);
    border-radius: 25px;
    padding: 50px 40px;
    margin: 0 auto 70px;
    max-width: 1200px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 50px var(--purple-shadow);
}

.popular-products::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.popular-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.popular-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.popular-title h2 {
    font-size: 2rem;
    margin: 0;
    font-weight: bold;
}

.popular-title .star {
    font-size: 2.5rem;
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.popular-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    position: relative;
    z-index: 2;
}

/* ========== کارت محصول ========== */
.product-card-new {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 8px 25px var(--shadow-color);
    border: 2px solid transparent;
}

.product-card-new:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px var(--purple-shadow);
    border-color: var(--primary-purple);
}

.product-image-new {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--light-gray);
}

.product-image-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card-new:hover .product-image-new img {
    transform: scale(1.15);
}

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-purple);
    color: var(--white);
    padding: 6px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(107, 95, 217, 0.4);
}

.product-info-new {
    padding: 25px;
}

.product-info-new h3 {
    color: var(--primary-gray);
    font-size: 1.15rem;
    margin-bottom: 12px;
    line-height: 1.6;
    font-weight: bold;
}

.product-specs-mini {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.spec-tag {
    background: var(--light-gray);
    color: var(--primary-purple);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    border-top: 2px solid var(--border-color);
}

.new-price {
    color: var(--primary-purple);
    font-weight: bold;
    font-size: 1.3rem;
}

.new-price small {
    font-size: 0.8rem;
    color: #666;
    font-weight: normal;
}

/* ========== بنرهای تبلیغاتی ========== */
.promo-banners {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto 70px;
    padding: 0 20px;
}

.promo-banner {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    height: 280px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.promo-banner:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px var(--purple-shadow);
}

.promo-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 35px;
    color: var(--white);
}

.promo-banner:first-child .promo-overlay {
    background: linear-gradient(135deg, rgba(74, 74, 74, 0.9), rgba(74, 74, 74, 0.7));
}

.promo-banner:last-child .promo-overlay {
    background: linear-gradient(135deg, rgba(107, 95, 217, 0.9), rgba(168, 160, 255, 0.7));
}

.promo-overlay h3 {
    font-size: 2rem;
    margin-bottom: 12px;
    font-weight: bold;
}

.promo-overlay p {
    font-size: 1.05rem;
    margin-bottom: 25px;
    opacity: 0.95;
    line-height: 1.8;
}

.promo-btn {
    background: var(--white);
    color: var(--primary-purple);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    display: inline-block;
    width: fit-content;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.promo-btn:hover {
    transform: translateX(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ========== محصولات پرفروش ========== */
.products-section {
    max-width: 1200px;
    margin: 0 auto 70px;
    padding: 0 20px;
}

.products-grid-new {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* ========== چرا فوم شاپ ========== */
.why-us {
    background: linear-gradient(135deg, var(--primary-gray) 0%, var(--dark-gray) 100%);
    padding: 80px 20px;
    color: var(--white);
    margin-bottom: 70px;
}

.why-us-content {
    max-width: 1200px;
    margin: 0 auto;
}

.why-us h2 {
    text-align: center;
    font-size: 2.3rem;
    margin-bottom: 50px;
    font-weight: bold;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 35px;
}

.why-item {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.why-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.why-icon {
    width: 90px;
    height: 90px;
    background: rgba(107, 95, 217, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 3rem;
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-purple);
}

.why-item h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: bold;
}

.why-item p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.8;
}

/* ========== مقالات ========== */
.blog-section {
    max-width: 1200px;
    margin: 0 auto 70px;
    padding: 0 20px;
}

.blog-grid-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card-new {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px var(--shadow-color);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.blog-card-new:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 45px var(--purple-shadow);
    border-color: var(--primary-purple);
}

.blog-image-new {
    height: 220px;
    background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.blog-content-new {
    padding: 30px;
}

.blog-meta-new {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
}

.blog-content-new h3 {
    color: var(--primary-gray);
    font-size: 1.2rem;
    margin-bottom: 15px;
    line-height: 1.7;
    font-weight: bold;
}

.blog-content-new p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.9;
    margin-bottom: 20px;
}

.read-more-new {
    color: var(--primary-purple);
    font-weight: bold;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more-new:hover {
    gap: 10px;
}

/* ========== برندها ========== */
.brands-section {
    background: var(--light-gray);
    padding: 60px 20px;
    margin-bottom: 70px;
    border-radius: 20px;
}

.brands-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.brands-content h2 {
    color: var(--primary-gray);
    margin-bottom: 40px;
    font-size: 2rem;
    font-weight: bold;
}

.brands-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    opacity: 0.7;
}

.brand-item {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary-gray);
    padding: 25px 35px;
    background: var(--white);
    border-radius: 15px;
    transition: all 0.3s;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.brand-item:hover {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 10px 25px var(--purple-shadow);
}

/* ========== فوتر ========== */
footer {
    background: var(--primary-gray);
    color: var(--white);
    padding: 60px 20px 30px;
    border-top: 5px solid var(--primary-purple);
}

footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: right;
}

.footer-title {
    margin-bottom: 25px;
    font-size: 1.3rem;
    color: var(--light-purple);
    font-weight: bold;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--light-purple);
}

.footer-col p {
    font-size: 0.95rem;
    line-height: 2.2;
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--white);
    display: block;
    margin-bottom: 12px;
    transition: all 0.3s;
    padding-right: 0;
}

.footer-col a:hover {
    color: var(--light-purple);
    padding-right: 8px;
}

.copyright {
    margin-top: 50px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    text-align: center;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}



/* ========== دکمه‌های عمومی ========== */
.btn {
    display: inline-block;
    font-weight: bold;
    border-radius: 30px;
    transition: all 0.3s;
    font-family: 'Vazir', sans-serif;
    cursor: pointer;
    border: none;
    padding: 14px 35px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-purple);
    color: var(--white);
    box-shadow: 0 5px 15px var(--purple-shadow);
}

.btn-primary:hover {
    background: var(--dark-purple);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--purple-shadow);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-purple);
}

/* ========== ریسپانسیو ========== */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .popular-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .products-grid-new {
        grid-template-columns: repeat(2, 1fr);
    }
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .top-features {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 30px;
    }
    .promo-banners {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-slider {
        height: auto;
        min-height: 450px;
    }
    .slide-content {
        flex-direction: column;
        text-align: center;
    }
    .slide-text h2 {
        font-size: 2rem;
    }
    .slide-image {
        display: none;
    }
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .popular-products-grid {
        grid-template-columns: 1fr;
    }
    .products-grid-new {
        grid-template-columns: 1fr;
    }
    .blog-grid-new {
        grid-template-columns: 1fr;
    }
    .why-grid {
        grid-template-columns: 1fr;
    }
    .top-features {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }
    .popular-header {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    footer .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-title::after {
        right: 50%;
        transform: translateX(50%);
    }
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .section-header h2::after {
        right: 50%;
        transform: translateX(50%);
    }
}

@media (max-width: 480px) {
    .slide-text h2 {
        font-size: 1.6rem;
    }
    .popular-title h2 {
        font-size: 1.5rem;
    }
    .section-header h2 {
        font-size: 1.5rem;
    }
}

/* ========== دسترسی‌پذیری ========== */
:focus-visible {
    outline: 3px solid var(--primary-purple);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}