/* ===== ریست و پایه ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

html {
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background-color: #1a3b2e;
    background-image: url('https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?q=80&w=2013&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(160deg, rgba(26, 59, 46, 0.8) 0%, rgba(46, 87, 62, 0.6) 100%);
    z-index: 0;
}

.site-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== هدر ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 0.8rem 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 200;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-svg {
    width: 55px;
    height: 55px;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 50%;
    padding: 6px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand h1 {
    font-size: 1.8rem;
    color: #d4af37;
    letter-spacing: 1px;
}

.brand span {
    font-size: 0.85rem;
    color: #f5f0e6;
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    text-decoration: none;
    color: #f5f0e6;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

nav ul li a:hover {
    color: #d4af37;
}

/* ===== مگامنوی وسط ===== */
.has-mega {
    position: static;
}

.has-mega > a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(26, 59, 46, 0.97);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 16px;
    padding: 20px;
    width: 90vw;
    max-width: 1100px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 300;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.mega-col h4 {
    color: #d4af37;
    border-bottom: 1px solid rgba(212,175,55,0.3);
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.mega-products {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mega-product-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #f5f0e6;
    transition: 0.3s;
    padding: 4px;
    border-radius: 8px;
}

.mega-product-item:hover {
    background: rgba(212,175,55,0.15);
    color: #d4af37;
}

.mega-product-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.2);
}

.mega-product-item small {
    display: block;
    color: #b0a590;
    font-size: 0.75rem;
}

/* ===== اسلایدر ===== */
.hero-slider {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 300px;
    max-height: 600px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
}

.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 2rem;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.slide-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(26,59,46,0.85) 0%, rgba(0,0,0,0.2) 50%, rgba(26,59,46,0.85) 100%);
    z-index: 0;
}

.slide-content {
    position: relative;
    z-index: 2;
    max-width: 90%;
    color: #fff;
}

.slide-content h2 {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.slide-content h2 span {
    color: #d4af37;
}

.slide-content p {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    opacity: 0.95;
    margin-bottom: 2rem;
    color: #f5f0e6;
}

.btn-primary {
    padding: 10px 30px;
    background: #d4af37;
    color: #1a3b2e;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(212,175,55,0.4);
}

.btn-primary:hover {
    background: #c09c2e;
    box-shadow: 0 6px 20px rgba(212,175,55,0.6);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: #d4af37;
    color: #1a3b2e;
    border-color: #d4af37;
}

.prev { left: 15px; }
.next { right: 15px; }

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

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

.dot.active {
    background: #d4af37;
    transform: scale(1.2);
}

/* ===== عنوان‌ها و بخش‌ها ===== */
.section-title {
    text-align: center;
    color: #f5f0e6;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.section-title span { color: #d4af37; }

.section-desc {
    text-align: center;
    color: #c4b7a6;
    margin-bottom: 3rem;
    font-size: 1rem;
}

/* ===== دسته‌بندی (کارت‌های شیشه‌ای) ===== */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-top: 3px solid #d4af37;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    transform: translateY(-12px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 25px rgba(212,175,55,0.3);
}

.glass-card i { font-size: 2.5rem; color: #d4af37; margin-bottom: 1rem; }
.glass-card h3 { color: #f5f0e6; margin-bottom: 0.8rem; }
.glass-card p { color: #c4b7a6; font-size: 0.95rem; line-height: 1.6; }

/* ===== محصولات پرفروش (اسکرول افقی) ===== */
.horizontal-scroll-container,
.horizontal-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #d4af37 rgba(255,255,255,0.2);
    -webkit-overflow-scrolling: touch;
}

.horizontal-scroll-container::-webkit-scrollbar,
.horizontal-scroll::-webkit-scrollbar { height: 8px; }

.horizontal-scroll-container::-webkit-scrollbar-track,
.horizontal-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1); border-radius: 10px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb,
.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #d4af37; border-radius: 10px;
}

/* ===== کارت محصول (نسخه اصلی - product-card-horizontal) ===== */
.product-card-horizontal {
    flex: 0 0 auto;
    width: 240px;
    max-width: 90%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    padding: 1.3rem 1rem 1.8rem 1rem;
    text-align: center;
    transition: 0.3s;
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-card-horizontal:hover {
    transform: translateY(-8px);
    border-color: #d4af37;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 25px rgba(0,0,0,0.2), 0 0 15px rgba(212,175,55,0.4);
}

.product-card-horizontal .img-wrapper {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.product-card-horizontal .img-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card-horizontal:hover .img-wrapper img { transform: scale(1.1); }

.product-card-horizontal h4 {
    color: #f5f0e6;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.product-card-horizontal .price {
    color: #d4af37;
    font-weight: bold;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.discount-badge {
    background: #ff6b6b;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 6px;
    font-weight: bold;
}

/* ===== کارت محصول جدید (product-card) ===== */
.product-card {
    flex: 0 0 auto;
    width: 240px;
    max-width: 90%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    padding: 1.3rem 1rem 1.8rem 1rem;
    text-align: center;
    transition: 0.3s;
    position: relative;
    overflow: visible;
}
.product-card:hover {
    transform: translateY(-8px);
    border-color: #d4af37;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 25px rgba(0,0,0,0.2), 0 0 15px rgba(212,175,55,0.4);
}
.product-card .img-wrapper {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1rem;
}
.product-card .img-wrapper img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.product-card:hover .img-wrapper img { transform: scale(1.1); }
.product-card h4 {
    color: #f5f0e6;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-card .price {
    color: #d4af37;
    font-weight: bold;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}
/* آیکون‌های قلب و نشانک */
.card-actions {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 5;
}
.product-card:hover .card-actions {
    opacity: 1;
    visibility: visible;
}
.action-icon {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.2); color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s; font-size: 1rem;
}
.action-icon.active, .action-icon:hover {
    background: #d4af37; color: #0a1a15; border-color: #d4af37;
}
/* بخش سبد خرید داخل کارت */
.cart-area {
    margin-top: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* ===== بخش دسته‌بندی‌های محصولات ===== */
.category-products-section {
    margin-bottom: 4rem;
}

.subcategories-list {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.subcategory-link {
    background: rgba(212,175,55,0.15);
    border: 1px solid rgba(212,175,55,0.3);
    color: #d4af37;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.3s;
}

.subcategory-link:hover {
    background: rgba(212,175,55,0.3);
    color: #fff;
}

/* ===== بخش مقالات و اخبار ===== */
.knowledge-section {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.knowledge-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.knowledge-col h3 {
    color: #f5f0e6;
    font-size: 1.5rem;
    border-right: 4px solid #d4af37;
    padding-right: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.knowledge-col h3 i { color: #d4af37; font-size: 1.4rem; }

.article-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-news-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 22px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.article-news-card:hover {
    transform: translateY(-8px);
    border-color: #d4af37;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(212,175,55,0.2);
}

.article-news-card .card-img-container {
    width: 100%;
    height: 230px;
    overflow: hidden;
}

.article-news-card .card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.article-news-card:hover .card-img-container img {
    transform: scale(1.1);
}

.article-news-card .card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
}

.article-news-card .card-body h4 {
    color: #f5f0e6;
    font-size: 1.25rem;
    margin-bottom: 0.7rem;
    line-height: 1.5;
}

.article-news-card .card-body p {
    color: #c4b7a6;
    font-size: 0.95rem;
    line-height: 1.8;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.article-news-card .card-body .read-more {
    margin-top: auto;
    color: #d4af37;
    font-weight: bold;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
    align-self: flex-start;
}

.article-news-card .card-body .read-more:hover {
    color: #fff;
}

.news-date-badge {
    background: rgba(212,175,55,0.2);
    border: 1px solid rgba(212,175,55,0.4);
    color: #d4af37;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
    display: inline-block;
    width: fit-content;
}

/* ===== منوی کاربری ===== */
.user-menu {
    position: relative;
}

.user-dropdown {
    position: relative;
}

.user-dropdown .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10,26,21,0.96);
    backdrop-filter: blur(15px);
    border: 1px solid #d4af37;
    border-radius: 12px;
    min-width: 160px;
    z-index: 500;
    padding: 0.5rem 0;
    margin-top: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.user-dropdown .dropdown-content a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #f5f0e6;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
}

.user-dropdown .dropdown-content a:hover {
    background: rgba(212,175,55,0.2);
    color: #d4af37;
}

.user-dropdown:hover .dropdown-content {
    display: block;
}

/* ===== فوتر ===== */
footer {
    background: rgba(26, 59, 46, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 24px 24px 0 0;
    padding: 3rem 2rem 1.5rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-col h4 {
    color: #d4af37;
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    border-right: 3px solid #d4af37;
    padding-right: 0.8rem;
}

.footer-col p, .footer-col a {
    color: #c4b7a6;
    line-height: 1.8;
    font-size: 0.95rem;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-col a:hover { color: #d4af37; }

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    color: #f5f0e6;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: #d4af37;
    color: #1a3b2e;
    transform: translateY(-4px);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #b0a590;
    font-size: 0.9rem;
}

/* ===== استایل‌های سبد خرید ===== */
.cart-controls {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid #d4af37;
    margin-top: 0.5rem;
}
.cart-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(212,175,55,0.2);
    color: #d4af37;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-btn:hover {
    background: #d4af37;
    color: #0a1a15;
}
.cart-quantity {
    width: 45px;
    height: 36px;
    border: none;
    background: transparent;
    color: #fff;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    outline: none;
}
.add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 30px;
    background: linear-gradient(135deg, #d4af37, #c09c2e);
    color: #0a1a15;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.3s;
    margin-top: 0.5rem;
}
.add-to-cart-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}
.remove-cart-btn {
    background: rgba(255,107,107,0.2);
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    margin-right: 6px;
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 900px) {
    .mega-menu {
        width: 95vw;
        left: 50% !important;
        transform: translateX(-50%) translateY(10px) !important;
    }
    .has-mega:hover .mega-menu {
        transform: translateX(-50%) translateY(0) !important;
    }
}

@media (max-width: 768px) {
    body { padding: 1rem; }
    header { flex-direction: column; align-items: flex-start; padding: 1rem; }
    nav ul { flex-wrap: wrap; gap: 0.8rem; }

    .hero-slider { height: 40vh; min-height: 250px; }
    .slider-btn { width: 38px; height: 38px; font-size: 0.9rem; }

    .services { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

    .product-card-horizontal { width: 200px; }
    .product-card-horizontal .img-wrapper { height: 140px; }

    .article-news-grid { grid-template-columns: 1fr; }

    .user-dropdown .dropdown-content {
        left: auto;
        right: 0;
    }
}