/* فایل: style.css (نسخه نهایی اصلاح شده بدون انیمیشن پس‌زمینه) */
@import url('https://fonts.googleapis.com/css2?family=Lalezar&family=Vazirmatn:wght@400;700&display=swap');

:root {
    --primary-color: #c0392b; /* قرمز اصلی */
    --secondary-color: #e74c3c; /* قرمز روشن‌تر */
    --background-color: #fdfaf6; /* پس‌زمینه کرم/سفید */
    --card-bg: #ffffff; /* پس‌زمینه کارت‌ها سفید */
    --text-color: #111111; /* متن اصلی مشکی */
    --text-muted: #555555; /* متن ثانویه خاکستری تیره */
    --header-bg: #111111; /* پس‌زمینه هدر مشکی */
    --footer-bg: #1c1c1c; /* پس‌زمینه فوتر خاکستری بسیار تیره */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
    direction: rtl; /* برای پشتیبانی کامل از زبان فارسی */
}

/* بخش انیمیشن پس‌زمینه حذف شد */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- هدر و لوگو (ویرایش شده با شبدر) --- */
.main-header { padding: 15px 0; background: var(--header-bg); position: sticky; top: 0; z-index: 100; border-bottom: 2px solid var(--primary-color); }
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.site-logo .logo-text {
    font-family: 'Lalezar', cursive;
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 1px;
    color: #fff;
}

.header-logo-clover {
    font-size: 1.8rem;
    animation: clover-color-spin 5s infinite ease-in-out;
}

@keyframes clover-color-spin {
    0%, 100% {
        color: #2ecc71; /* Green */
        transform: rotate(0deg) scale(1.05);
        text-shadow: 0 0 12px rgba(46, 204, 113, 0.8);
    }
    33% {
        color: #ffffff; /* White */
        transform: rotate(10deg) scale(1.15);
        text-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
    }
    66% {
        color: var(--primary-color); /* Red */
        transform: rotate(-10deg) scale(1.15);
        text-shadow: 0 0 12px rgba(192, 57, 43, 0.8);
    }
}


/* --- محتوای اصلی --- */
.main-content {
    padding: 20px 0;
}

/* --- نوار اطلاعیه --- */
.announcement-bar { padding: 12px; text-align: center; color: #fff; font-weight: bold; margin-bottom: 20px; border-radius: 10px;}

/* --- گرید محصولات --- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.product-card { background: var(--card-bg); border: 1px solid #eee; border-radius: 12px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.product-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); }
.product-image { position: relative; }
.product-image img { width: 100%; height: auto; display: block; }
.product-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.product-title { font-size: 1.1rem; color: var(--text-color); margin-bottom: 8px; }
.product-category { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; }
.product-price { margin-bottom: 20px; border-top: 1px solid #eee; padding-top: 15px; display: flex; justify-content: space-between; align-items: center; }
.product-badge { position: absolute; top: 15px; left: 15px; background-color: var(--secondary-color); color: white; padding: 5px 10px; border-radius: 5px; font-size: 14px; font-weight: bold; }
.btn { display: inline-block; background-color: var(--primary-color); color: #fff; text-align: center; padding: 12px 20px; border-radius: 8px; text-decoration: none; font-weight: bold; transition: background-color 0.3s ease; border: none; cursor: pointer; }
.btn:hover { background-color: #a53125; }

/* --- فوتر --- */
.main-footer { padding: 40px 0 20px; background: var(--footer-bg); margin-top: 50px; color: #f0f0f0; }
.main-footer .container { border-top: 1px solid #444; padding-top: 30px; }
.footer-columns { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; text-align: right; margin-bottom: 30px; }
.footer-col { flex: 1; min-width: 250px; }
.footer-col h4 { color: #fff; margin-bottom: 15px; }
.footer-col p { color: #ccc; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #ccc; text-decoration: none; transition: color 0.3s; }
.footer-col ul li a:hover { color: var(--primary-color); }

/* --- کپی رایت --- */
.copyright { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid #444; font-size: 0.9rem; color: #aaa; }

/* --- نوارهای محصولات (بزرگ) --- */
.product-carousel-section { 
    padding: 30px 20px; 
    margin: 40px 0; 
    border-radius: 15px; 
    background-color: #f5f5f5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.carousel-title { text-align: center; font-size: 24px; margin-bottom: 25px; color: var(--text-color); }
.main-grid-title { text-align: center; font-size: 26px; margin-top: 50px; margin-bottom: 25px; color: var(--text-color); }
.product-carousel { 
    display: flex; 
    overflow-x: auto; 
    scroll-behavior: smooth; 
    gap: 25px; 
    padding: 10px 5px 20px 5px; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; 
}
.product-carousel::-webkit-scrollbar { display: none; }
.product-carousel .product-card { 
    flex: 0 0 280px; 
    transform: none; 
    transition: transform 0.2s ease-in-out; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.product-carousel .product-card:hover { transform: translateY(-5px); }

/* --- داشبورد و منوی همبرگری --- */
#hamburger-menu { width: 30px; height: 25px; cursor: pointer; z-index: 1002; display: flex; flex-direction: column; justify-content: space-around; }
#hamburger-menu span { display: block; width: 100%; height: 3px; background-color: #fff; border-radius: 3px; transition: all 0.3s ease-in-out; }
#hamburger-menu.active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
#hamburger-menu.active span:nth-child(2) { opacity: 0; }
#hamburger-menu.active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

#cart-icon-header { color: #fff; text-decoration: none; font-size: 1.3rem; position: relative; }
.cart-count { position: absolute; top: -8px; right: -10px; background: var(--primary-color); color: white; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.hidden { display: none !important; }

#side-dashboard { position: fixed; top: 0; right: -280px; width: 280px; height: 100%; background-color: var(--footer-bg); box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5); z-index: 1001; transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); padding-top: 80px; border-left: 2px solid var(--primary-color); }
#side-dashboard.active { right: 0; }
#side-dashboard ul { list-style: none; }
#side-dashboard ul li a { display: flex; align-items: center; padding: 15px 25px; color: #f0f0f0; text-decoration: none; font-size: 1.1rem; transition: background-color 0.3s, padding-right 0.3s; border-bottom: 1px solid #333; }
#side-dashboard ul li a:hover { background-color: var(--primary-color); padding-right: 30px; }
#side-dashboard ul li a i { margin-left: 15px; width: 20px; text-align: center; }

#overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 1000; opacity: 0; transition: opacity 0.4s; }
#overlay.active { display: block; opacity: 1; }

/* --- بخش ویژگی‌ها --- */
.features-section {
    padding: 60px 0;
    margin-top: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 25px;
    text-align: right;
    direction: rtl;
}

.feature-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.02);
    border: 2px dashed var(--primary-color);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
}

.feature-icon i {
    font-size: 32px;
    color: var(--primary-color);
    transition: all 0.3s ease-in-out;
}

.feature-item:hover .feature-icon {
    transform: translateY(-5px) scale(1.05);
    border-style: solid;
    border-color: var(--primary-color);
    background-color: rgba(192, 57, 43, 0.1);
}

.feature-item:hover .feature-icon i { transform: rotate(10deg); }
.feature-text h4 { font-size: 1.4rem; font-weight: 700; color: var(--text-color); margin: 0 0 8px 0; }
.feature-text p { font-size: 1rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ========================================================================== */
/* ============= استایل‌های جدید بنر اصلی (HERO SECTION) ============= */
/* ========================================================================== */

.hero-section {
    margin: 25px auto 50px auto;
    padding: 0;
}

.hero-wrapper {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    padding: 6px; /* فضا برای حاشیه متحرک */
    background: var(--header-bg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    height: 350px; /* ارتفاع ثابت برای بنر */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* انیمیشن حاشیه رنگی */
.hero-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    z-index: 1;
    background: conic-gradient(
        from 0deg, 
        transparent 0%, 
        var(--primary-color) 20%, 
        var(--secondary-color) 50%, 
        var(--primary-color) 80%, 
        transparent 100%
    );
    transform: translate(-50%, -50%);
    animation: spin-border 5s linear infinite;
}

@keyframes spin-border {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: block;
    object-fit: cover;
    border-radius: 14px; /* گردی گوشه‌ها کمتر از کادر اصلی */
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end; /* متن به پایین و راست می‌رود */
    justify-content: flex-end; /* متن به راست می‌رود */
    pointer-events: none;
}

.animated-logo-container {
    pointer-events: auto;
    padding: 20px 30px;
    margin-bottom: 20px;
    margin-right: 20px;
    animation: float-up-down 6s ease-in-out infinite;
    position: relative;
    z-index: 4;
}

@keyframes float-up-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.animated-logo-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: rgba(28, 28, 28, 0.7); /* پس زمینه تیره شیشه‌ای */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: -1;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

.hero-title-text {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* استایل‌های واکنش‌گرا برای بنر */
@media (max-width: 992px) {
    .hero-wrapper { height: 300px; }
    .hero-title-text { font-size: 1.8rem; }
}

@media (max-width: 768px) {
    .hero-wrapper { height: 250px; border-radius: 12px; padding: 4px; }
    .hero-background-image { border-radius: 10px; }
    .hero-title-text { font-size: 1.5rem; }
    .animated-logo-container { padding: 15px 25px; margin-bottom: 15px; margin-right: 15px; }
}

@media (max-width: 480px) {
    .hero-wrapper { height: 180px; }
    .hero-title-text { font-size: 1.2rem; }
    .animated-logo-container { padding: 10px 20px; margin-bottom: 10px; margin-right: 10px; }
}

/* ========================================================================== */
/* ============= استایل‌های جدید بخش دسته‌بندی محصولات (دایره‌ای) ============= */
/* ========================================================================== */

.category-showcase {
    margin: 50px auto;
    padding: 20px 0;
    text-align: center; /* برای وسط قرار گرفتن عنوان */
}

.category-showcase-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 30px;
}

.category-circles-container {
    display: flex;
    justify-content: center; /* برای وسط قرار دادن آیتم‌ها */
    flex-wrap: wrap; /* برای شکستن به خط بعدی در صورت کمبود فضا */
    gap: 30px; /* فاصله بین دایره‌ها */
    padding: 0 10px;
}

.category-circle-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 140px; /* عرض ثابت برای هر کارت دایره‌ای */
    position: relative;
    z-index: 1; /* برای اطمینان از قرارگیری روی عناصر دیگر */
}

.category-circle-card:hover {
    transform: translateY(-8px);
    /* box-shadow: 0 8px 16px rgba(192, 57, 43, 0.15); */
}

.category-circle-image-wrapper {
    width: 100px; /* اندازه دایره اصلی */
    height: 100px; /* اندازه دایره اصلی */
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--card-bg); /* پس‌زمینه سفید برای دایره */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    border: 3px solid transparent; /* حاشیه پیش‌فرض */
    transition: all 0.3s ease;
}

.category-circle-card:hover .category-circle-image-wrapper {
    border-color: var(--primary-color); /* تغییر رنگ حاشیه در هاور */
    box-shadow: 0 6px 20px rgba(var(--primary-color), 0.25);
    transform: scale(1.05);
}

.category-circle-image-wrapper img {
    width: 80%; /* اندازه تصویر داخل دایره */
    height: 80%; /* اندازه تصویر داخل دایره */
    object-fit: contain; /* برای حفظ نسبت تصویر */
    border-radius: 50%; /* اگر تصویر مربع باشد، دایره‌ای می‌شود */
    transition: transform 0.3s ease;
}

.category-circle-card:hover .category-circle-image-wrapper img {
    transform: scale(1.1); /* بزرگنمایی تصویر در هاور */
}

.category-circle-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap; /* جلوگیری از شکستن عنوان */
    overflow: hidden;
    text-overflow: ellipsis; /* نمایش ... در صورت طولانی بودن */
    max-width: 100%; /* برای اعمال ellipsis */
}

/* استایل واکنش‌گرا برای دسته‌بندی‌های دایره‌ای */
@media (max-width: 768px) {
    .category-circles-container {
        gap: 20px;
    }
    .category-circle-card {
        width: 120px;
    }
    .category-circle-image-wrapper {
        width: 90px;
        height: 90px;
    }
    .category-circle-image-wrapper img {
        width: 75%;
        height: 75%;
    }
    .category-circle-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .category-circles-container {
        gap: 15px;
    }
    .category-circle-card {
        width: 100px;
    }
    .category-circle-image-wrapper {
        width: 75px;
        height: 75px;
    }
    .category-circle-image-wrapper img {
        width: 70%;
        height: 70%;
    }
    .category-circle-title {
        font-size: 0.85rem;
    }
}