/* --- تنظیمات کلی و متغیرهای رنگ --- */
:root {
    --bg-color: #fdf2f8;
    --pink-main: #ffb6c1;
    --pink-dark: #f472b6;
    --purple-light: #e9d5ff;
    --text-dark: #4b5563;
    --white: #ffffff;
    --radius: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'YekanBakh', 'Vazirmatn', sans-serif; /* استفاده از فونت زیبا */
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    direction: rtl;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- هدر سایت --- */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--pink-dark);
}

.nav a {
    text-decoration: none;
    color: var(--text-dark);
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--pink-dark);
}

.cart-btn {
    display: flex;
    align-items: center;
    background-color: var(--pink-main);
    color: var(--white);
    padding: 8px 15px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: bold;
    position: relative;
    transition: background 0.3s;
}

.cart-btn:hover {
    background-color: var(--pink-dark);
}

.cart-badge {
    background-color: var(--white);
    color: var(--pink-dark);
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
    position: absolute;
    top: -5px;
    right: -5px;
}

/* --- بنر اصلی (Hero) --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--pink-main), var(--purple-light));
    border-radius: var(--radius);
    margin-top: 30px;
    padding: 40px;
    box-shadow: 0 10px 20px rgba(255, 182, 193, 0.3);
}

.hero-content {
    flex: 1;
    padding-left: 20px;
}

.hero-content h1 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.hero-content p {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--white);
    color: var(--pink-dark);
    padding: 12px 30px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- بخش محصولات --- */
.products-section {
    margin-top: 60px;
    margin-bottom: 60px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.8rem;
    color: var(--pink-dark);
    margin-bottom: 30px;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 182, 193, 0.4);
}

.product-img {
    height: 200px;
    background-color: #fce7f3;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product-info {
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-dark);
    min-height: 2.2rem;
}

.price {
    color: var(--pink-dark);
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.btn-add-cart {
    background-color: var(--pink-main);
    color: var(--white);
    border: none;
    padding: 10px;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    width: 100%;
    transition: background 0.3s;
    margin-top: auto;
}

.btn-add-cart:hover {
    background-color: var(--pink-dark);
}

.btn-add-cart:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.empty-msg {
    text-align: center;
    grid-column: 1 / -1;
    color: #888;
    font-size: 1.2rem;
    padding: 40px;
}

/* --- فوتر --- */
.footer {
    background-color: var(--white);
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    border-top: 2px dashed var(--pink-main);
}

/* ========================================= */
/* بخش ریسپانسیو (مخصوص موبایل و تبلت) */
/* ========================================= */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav a {
        margin: 0 8px;
        font-size: 0.9rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .hero-content {
        padding-left: 0;
        margin-bottom: 20px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-image img {
        max-width: 80%;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .product-img {
        height: 150px;
    }
}