/**
 * TostiShop Homepage Custom Styles
 * 
 * Additional styles specific to the homepage template
 */

/* Hero Section Enhancements */
.hero-section {
    background-image: linear-gradient(135deg, #14175b 0%, #1e3a8a 100%);
    min-height: 70vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: 1;
}

/* Category Cards Hover Effects */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-card img {
    transition: transform 0.3s ease;
}

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

/* Product Cards on Homepage */
.product-item {
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Deal Cards Special Styling */
.deal-card .product-item {
    position: relative;
    overflow: hidden;
}

.deal-card .product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(224, 32, 41, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.deal-card .product-item:hover::before {
    opacity: 1;
}

/* Newsletter Form Styling */
.newsletter-form input:focus {
    outline: none;
    ring: 2px;
    ring-color: #e42029;
    border-color: transparent;
}

/* Service Strip Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-strip-item {
    animation: fadeInUp 0.6s ease forwards;
}

.service-strip-item:nth-child(2) {
    animation-delay: 0.2s;
}

.service-strip-item:nth-child(3) {
    animation-delay: 0.4s;
}

/* Testimonial Cards */
.testimonial-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-section .text-accent {
        font-size: 2.5rem;
    }
    
    .category-card {
        margin-bottom: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Scroll Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* App Store Buttons Hover */
.app-store-btn {
    transition: all 0.3s ease;
}

.app-store-btn:hover {
    transform: scale(1.05);
}

/* Firebase Login Button */
#firebase-login {
    position: relative;
    overflow: hidden;
}

#firebase-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

#firebase-login:hover::before {
    left: 100%;
}

/* Section Dividers */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #e42029, transparent);
    margin: 2rem auto;
    width: 50px;
}

/* Custom Scrollbar for Horizontal Scrolling */
.horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #e42029;
    border-radius: 3px;
}

.horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: #c31e26;
}

/* Pulse Animation for CTAs */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(224, 32, 41, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(224, 32, 41, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(224, 32, 41, 0);
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hero-section {
        background: #000;
        color: #fff;
    }
    
    .category-card {
        border: 2px solid #000;
    }
    
    .product-item {
        border: 1px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .hero-section,
    .newsletter-form,
    #firebase-login,
    .app-store-btn {
        display: none;
    }
    
    .category-card,
    .product-item {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
}
