/**
 * Homepage Styles
 * Loaded only on homepage
 * 
 * @package Ecommerce_Pro
 * @since 1.0.0
 */

/* ========== HERO SECTION ========== */
.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ep-primary, #3b82f6) 0%, var(--ep-secondary, #10b981) 100%);
    color: #ffffff;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
}

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

.hero-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.hero-buttons .btn-white {
    background-color: #ffffff;
    color: var(--ep-primary, #3b82f6);
    border-color: #ffffff;
}

.hero-buttons .btn-white:hover {
    background-color: #f3f4f6;
    border-color: #f3f4f6;
}

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

/* ========== FEATURES SECTION ========== */
.features-section {
    padding: 5rem 0;
    background-color: #f9fafb;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ep-primary, #3b82f6) 0%, var(--ep-secondary, #10b981) 100%);
    color: #ffffff;
}

.feature-icon svg {
    width: 2rem;
    height: 2rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.feature-description {
    color: #6b7280;
    line-height: 1.6;
}

/* ========== PRODUCTS SHOWCASE ========== */
.products-showcase {
    padding: 5rem 0;
}

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

.product-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background-color: #f3f4f6;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    z-index: 1;
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--ep-primary, #3b82f6);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-price .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ep-primary, #3b82f6);
}

.product-price .original-price {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.product-rating svg {
    width: 1rem;
    height: 1rem;
    fill: #fbbf24;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

/* ========== CTA SECTION ========== */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--ep-primary, #3b82f6) 0%, #6366f1 100%);
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="white" fill-opacity="0.05"/></svg>');
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: #ffffff;
    color: var(--ep-primary, #3b82f6);
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/* ========== TESTIMONIALS SECTION ========== */
.testimonials-section {
    padding: 5rem 0;
    background-color: #ffffff;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    padding: 2rem;
    background-color: #f9fafb;
    border-radius: 0.75rem;
    border-left: 4px solid var(--ep-primary, #3b82f6);
}

.testimonial-content {
    margin-bottom: 1.5rem;
    font-style: italic;
    color: #4b5563;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--ep-primary, #3b82f6);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: #1f2937;
}

.author-role {
    font-size: 0.875rem;
    color: #6b7280;
}

/* ========== RESPONSIVE HOMEPAGE ========== */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .features-grid,
    .product-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }
}

/* ========== ANIMATION UTILITIES ========== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for grid items */
.features-grid .feature-card,
.product-grid .product-card,
.testimonials-grid .testimonial-card {
    animation: fadeInUp 0.6s ease both;
}

.features-grid .feature-card:nth-child(1) { animation-delay: 0.1s; }
.features-grid .feature-card:nth-child(2) { animation-delay: 0.2s; }
.features-grid .feature-card:nth-child(3) { animation-delay: 0.3s; }
.features-grid .feature-card:nth-child(4) { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    .hero-title,
    .hero-description,
    .hero-buttons,
    .animate-on-scroll,
    .features-grid .feature-card,
    .product-grid .product-card,
    .testimonials-grid .testimonial-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}