﻿:root {
    --primary-green: #4CAF50;
    --light-green: #E8F5E9;
    --yellow: #FFEB3B;
    --dark-text: #2E7D32;
    --light-text: #388E3C;
    --background: #f9f9f9;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background);
    color: #333;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* استایل هدر مشترک */
header {
    background-color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-text);
    display: flex;
    align-items: center;
    text-decoration: none;
}

    .logo i {
        margin-left: 10px;
        color: var(--primary-green);
    }

nav ul {
    display: flex;
    list-style: none;
}

    nav ul li {
        margin-left: 20px;
    }

        nav ul li a {
            color: var(--dark-text);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s;
            padding: 5px 10px;
            border-radius: 5px;
        }

            nav ul li a:hover {
                color: var(--primary-green);
                background-color: var(--light-green);
            }

/* استایل فوتر مشترک */
footer {
    background-color: var(--dark-text);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    border-radius: 10px 10px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: var(--yellow);
}

    .footer-section h3:after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 50px;
        height: 2px;
        background-color: var(--yellow);
    }

.contact-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-left: 10px;
    color: var(--yellow);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

    .social-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        color: white;
        transition: all 0.3s;
    }

        .social-links a:hover {
            background-color: var(--yellow);
            color: var(--dark-text);
            transform: translateY(-5px);
        }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #ccc;
}

/* رسپانسیو مشترک */
@media (max-width: 768px) {
    body {
        padding: 0 10px;
    }

    .header-container {
        flex-wrap: wrap;
    }

    nav {
        width: 100%;
        margin-top: 15px;
        display: none;
    }

        nav.active {
            display: block;
        }

        nav ul {
            flex-direction: column;
            background-color: var(--white);
            border-radius: 10px;
            padding: 15px;
            box-shadow: var(--shadow);
        }

            nav ul li {
                margin: 10px 0;
            }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.3rem;
    }

    .cart-icon {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}




/* استایل‌های سبد خرید */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 2px solid var(--primary-green);
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--shadow);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .notification-content i {
        color: var(--primary-green);
        font-size: 1.2rem;
    }

.view-cart-btn {
    background: var(--primary-green);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.8rem;
    margin-right: auto;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* استایل‌های صفحه سبد خرید */
/* استایل‌های سبد خرید */
.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: white;
    gap: 1rem;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

    .cart-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .cart-item-image i {
        font-size: 2rem;
        color: #4caf50;
    }

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-weight {
    color: #666;
    font-size: 0.9rem;
}

.cart-item-quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .cart-item-quantity-selector label {
        font-size: 0.9rem;
        color: #333;
        white-space: nowrap;
    }

.cart-quantity-dropdown {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 100px;
}

.cart-item-prices {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.cart-item-current-price {
    font-weight: bold;
    font-size: 1.1rem;
    color: #e53935;
}

.cart-item-original-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

.cart-item-discount {
    font-size: 0.8rem;
    color: #4caf50;
    background: #e8f5e8;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.remove-item {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
}

    .remove-item:hover {
        background: #d32f2f;
    }

/* خلاصه سبد خرید */
.cart-summary {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

    .summary-row:last-child {
        border-bottom: none;
        font-weight: bold;
        font-size: 1.2rem;
        color: #333;
    }

.discount-amount {
    color: #4caf50;
}

.original-price-amount {
    color: #999;
    text-decoration: line-through;
}

/* پیام‌های سبد خرید */
.cart-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 300px;
}

    .cart-message.success {
        background: #4caf50;
        border: 1px solid #45a049;
    }

    .cart-message.error {
        background: #f44336;
        border: 1px solid #da190b;
    }

    .cart-message.info {
        background: #2196f3;
        border: 1px solid #1976d2;
    }

    .cart-message.show {
        transform: translateX(0);
        opacity: 1;
    }

/* سبد خرید خالی */
.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

    .empty-cart i {
        font-size: 4rem;
        color: #ddd;
        margin-bottom: 1rem;
    }

    .empty-cart h3 {
        margin-bottom: 1rem;
        color: #333;
    }

.cta-button {
    display: inline-block;
    background: #4caf50;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 1rem;
    transition: background 0.3s;
}

    .cta-button:hover {
        background: #45a049;
    }

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.quantity-btn {
    background: var(--light-green);
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-input {
    width: 40px;
    height: 30px;
    border: none;
    text-align: center;
    background: white;
}

.remove-item {
    background: #ff4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.cart-summary {
    background: var(--light-green);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--primary-green);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
}

.summary-total {
    border-top: 2px solid var(--primary-green);
    padding-top: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--dark-text);
}

.checkout-btn {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    transition: all 0.3s;
}

    .checkout-btn:hover {
        background: var(--dark-text);
        transform: translateY(-2px);
    }

.empty-cart {
    text-align: center;
    padding: 3rem;
    color: #666;
}

    .empty-cart i {
        font-size: 4rem;
        color: #ccc;
        margin-bottom: 1rem;
    }