/* style.css - AuraDeck Cozy / Aesthetic Theme */
:root {
    --bg-color: #fdfbf7;        /* کرم بسیار روشن */
    --text-color: #4a4a4a;      /* خاکستری نرم */
    --accent-mint: #d4e9e2;     /* سبز نعنایی ملایم */
    --accent-lavender: #e6e6fa; /* اسطوخودوسی ملایم */
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --primary-btn-bg: #82b1ff;   /* آبی پاستلی خوش‌رنگ */
    --primary-btn-text: #ffffff;
    --header-bg: rgba(253, 251, 247, 0.94);
    --footer-bg: #f5f0eb;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
}

/* ==========================================================
   ✨ HERO & COMPACT SECTIONS
   ========================================================== */
.hero-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-slide-bg {
    height: 38vh;
    min-height: 270px;
    max-height: 350px;
    background-size: cover;
    background-position: center;
    transition: transform 5s ease;
}

.carousel-item.active .hero-slide-bg {
    transform: scale(1.03);
}

.hero-title {
    font-size: 1.75rem;
    color: #2c3e50;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.hero-content h1 {
    color: #2c3e50;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
}

.hero-desc {
    font-size: 0.95rem;
}

.section-title-compact {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

/* کارت‌های محصول فشرده */
.product-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.product-card img {
    height: 110px;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* ==========================================================
   ✨ CURATED BUNDLES (اصلاح‌شده با پدینگ و تایپوگرافی تمیز)
   ========================================================== */
.bundle-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bundle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.bundle-image-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #f7f4ee;
}

.bundle-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.bundle-card:hover .bundle-image {
    transform: scale(1.03);
}

.bundle-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    color: #2c3e50;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.bundle-body {
    padding: 1.25rem 1.25rem 1.35rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.bundle-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.4rem;
}

.bundle-desc {
    font-size: 0.88rem;
    color: #6c757d;
    line-height: 1.45;
}

.bundle-items {
    font-size: 0.8rem;
    color: #88929b;
    background-color: #fdfbf7;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: 1px dashed rgba(0, 0, 0, 0.08);
}

.bundle-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
}

.bundle-old-price {
    font-size: 0.88rem;
    text-decoration: line-through;
    color: #a0a6ad;
}

/* ==========================================================
   ✨ STICKY HEADER & BASE NAV
   ========================================================== */
.sticky-header {
    background-color: var(--header-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.35rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.sticky-header .navbar-nav .nav-link {
    position: relative;
    color: #3e444a !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem !important;
    letter-spacing: 0.2px;
    transition: color 0.25s ease;
}

.sticky-header .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, #82b1ff, #d4e9e2);
    border-radius: 2px;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-header .navbar-nav .nav-link:hover::after,
.sticky-header .navbar-nav .nav-item.dropdown:hover .nav-link::after {
    transform: translateX(-50%) scaleX(1);
}

.sticky-header .navbar-nav .nav-link:hover {
    color: #1a1a1a !important;
}

.sticky-header .navbar-nav .nav-link.text-danger:hover {
    color: #e04f5f !important;
}

/* ==========================================================
   ✨ CATEGORIES DROPDOWN (DESKTOP)
   ========================================================== */
.sticky-header .nav-item.dropdown {
    position: relative;
}

.sticky-header .dropdown-menu {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(230, 225, 218, 0.8) !important;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    border-radius: 14px !important;
    padding: 0.6rem;
    min-width: 220px;
    top: 100% !important;
    margin-top: 4px !important;
}

.sticky-header .dropdown-item {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a4f56;
    padding: 0.6rem 1rem !important;
    border-radius: 10px;
    transition: all 0.22s ease-in-out;
    position: relative;
    display: flex;
    align-items: center;
}

.sticky-header .dropdown-item:hover,
.sticky-header .dropdown-item:focus {
    background-color: #f7f4ee !important;
    color: #1f2937 !important;
    font-weight: 600;
    transform: translateX(5px);
}

.sticky-header .dropdown-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 4px;
    height: 4px;
    background-color: #82b1ff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.sticky-header .dropdown-item:hover::before {
    transform: translateY(-50%) scale(1);
}

/* ==========================================================
   ✨ ACTION BUTTONS (SEARCH, ACCOUNT, CART)
   ========================================================== */
.header-action-dropdown {
    position: relative;
}

.nav-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #3e444a;
    background: transparent;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000;
    transform: translateY(-2px);
}

/* 1. EXPANDABLE SEARCH BAR */
.header-search-wrap {
    position: relative;
}

.header-search-box {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) scaleX(0.85);
    opacity: 0;
    visibility: hidden;
    width: 270px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: right center;
    z-index: 1050;
}

.header-search-box.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scaleX(1);
}

.search-input {
    font-size: 0.88rem;
    padding: 0.45rem 0.2rem;
}

.search-input:focus {
    outline: none;
    box-shadow: none;
}

/* 2 & 3. ACTION POPUP CARDS (ACCOUNT & CART) - DESKTOP */
.action-popup-card {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    min-width: 310px;
    max-width: 340px;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(230, 225, 218, 0.8) !important;
    margin-top: 8px !important;
    z-index: 1050;
}

.mini-cart-card {
    width: 320px;
}

.cart-item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.cart-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
}

.remove-item-btn {
    text-decoration: none;
    transition: color 0.15s ease;
}

.remove-item-btn:hover {
    color: #e04f5f !important;
}

.action-sublinks a {
    transition: all 0.18s ease;
}

.action-sublinks a:hover {
    color: #1a1a1a !important;
    transform: translateX(4px);
}

/* ==========================================================
   🖥️ رفتار Hover در دسکتاپ (فقط صفحه‌های بالای ۹۹۲ پیکسل)
   ========================================================== */
@media (min-width: 992px) {
    .sticky-header .nav-item.dropdown:hover > .dropdown-menu,
    .header-action-dropdown:hover > .action-popup-card {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }

    .sticky-header .dropdown-menu,
    .header-action-dropdown > .action-popup-card {
        display: block !important;
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
        pointer-events: none;
    }

    /* پل نامرئی هاور برای جلوگیری از بسته شدن با موس */
    .sticky-header .dropdown-menu::before,
    .header-action-dropdown > .action-popup-card::before {
        content: '';
        position: absolute;
        top: -15px;
        left: 0;
        width: 100%;
        height: 15px;
        background: transparent;
        display: block;
    }
}

/* ==========================================================
   📱 بهینه‌سازی ریسپانسیو (موبایل و تبلت زیر ۹۹۲ پیکسل)
   ========================================================== */
@media (max-width: 991.98px) {
    /* غیرفعال‌سازی قطعی پاپ‌آپ‌های اکانت و سبد خرید در موبایل */
    .header-action-dropdown .action-popup-card {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* منوی کشویی ساندویچی */
    .navbar-collapse {
        background: #ffffff;
        border-radius: 16px;
        padding: 1rem 1.25rem;
        margin-top: 0.75rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(0, 0, 0, 0.04);
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 0.5rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }

    .sticky-header .dropdown-menu {
        background: #fdfbf7 !important;
        box-shadow: none !important;
        position: static !important;
        margin: 0.4rem 0 !important;
    }

    /* سرچ‌بار در موبایل */
    .header-search-box {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 62px;
        width: auto;
        transform: translateY(-8px);
        transition: all 0.25s ease;
    }

    .header-search-box.active {
        transform: translateY(0);
    }

    .navbar-icons .nav-action-btn {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }
}

/* ==========================================================
   🌈 دکمه‌ها و فوتر
   ========================================================== */
.btn-primary-pastel {
    background-color: var(--primary-btn-bg);
    color: var(--primary-btn-text) !important;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(130, 177, 255, 0.35);
    transition: all 0.3s ease;
}

.btn-primary-pastel:hover {
    background-color: #448aff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(68, 138, 255, 0.45);
}

.site-footer {
    background-color: var(--footer-bg);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}
