/* Components CSS - کامپوننت‌های قابل استفاده مجدد */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-cream) 0%, #EAE8DB 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23556B2F' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    color: var(--primary-olive);
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s backwards;
}

/* Category Boxes */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.category-box {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(85, 107, 47, 0.2);
}

.category-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.category-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.category-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-olive);
    margin-bottom: 0.5rem;
}

.category-description {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Feature Boxes - "چرا فردوس" */
.features {
    background-color: var(--bg-white);
    padding: 4rem 0;
    margin: 3rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.feature-box {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--primary-olive);
}

.feature-title {
    font-size: 1.5rem;
    color: var(--primary-olive);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-light);
}

/* Product Slider */
.product-slider {
    margin: 3rem 0;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.slider-title {
    font-size: 2rem;
    color: var(--primary-olive);
}

.slider-controls {
    display: flex;
    gap: 1rem;
}

.slider-btn {
    background-color: var(--primary-olive);
    color: var(--primary-cream);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background-color: var(--accent-gold);
}

/* Product Card */
.product-card {
    position: relative;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-orange);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 10;
}

.product-image-container {
    position: relative;
    overflow: hidden;
}

.product-favorite {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
    z-index: 10;
}

.product-favorite:hover,
.product-favorite.active {
    color: var(--accent-orange);
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-olive);
    margin: 1rem 0;
}

.product-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.product-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Messages / Alerts */
.messages-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert {
    background-color: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInRight 0.3s ease;
}

.alert-success {
    border-right: 4px solid #27ae60;
}

.alert-error {
    border-right: 4px solid #e74c3c;
}

.alert-warning {
    border-right: 4px solid #f39c12;
}

.alert-info {
    border-right: 4px solid #3498db;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
    margin-right: 1rem;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-cream);
    border-top: 4px solid var(--primary-olive);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(245, 245, 220, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-cream);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-gold);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .messages-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

