/* Custom Styles for INDUS AYURVEDA */

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Ensure full width on mobile devices */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #D4A03D;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B8942A;
}

/* Enhanced button animations */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Product card enhancements */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 160, 61, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Hero section enhancements */
.hero-bg {
    position: relative;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(26, 26, 26, 0.8) 100%);
    z-index: 1;
}

.hero-bg > div {
    position: relative;
    z-index: 2;
}

/* Logo animation */
.logo-container {
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

/* Navigation link hover effects */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #D4A03D;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Cart sidebar enhancements */
#cart-sidebar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Form input focus effects */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(212, 160, 61, 0.1);
}

/* Testimonial card enhancements */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(212, 160, 61, 0.05), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.testimonial-card:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Apply animations to elements */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Enhanced mobile menu */
#mobile-menu {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

#mobile-menu.show {
    transform: translateY(0);
}

/* Cart notification enhancements */
.cart-notification {
    animation: slideInRight 0.3s ease-out;
}

/* Product image hover effects */
.product-image {
    transition: transform 0.3s ease;
}

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

/* Footer enhancements */
footer a {
    position: relative;
    transition: color 0.3s ease;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #D4A03D;
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Search modal enhancements */
.search-modal {
    animation: fadeInUp 0.3s ease-out;
}

/* Mobile-specific full-width styles */
@media (max-width: 768px) {
    /* Ensure navigation spans full width on mobile */
    nav.bg-ayurveda-charcoal {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Ensure footer spans full width on mobile */
    footer.bg-ayurveda-charcoal {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Override any max-width constraints on mobile */
    nav .max-w-7xl,
    footer .max-w-7xl {
        max-width: none !important;
        width: 100%;
    }
    
    .hero-bg h1 {
        font-size: 3rem;
        line-height: 1.2;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    /* Additional mobile optimizations */
    nav.bg-ayurveda-charcoal,
    footer.bg-ayurveda-charcoal {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Ensure full viewport width on very small devices */
    nav.bg-ayurveda-charcoal,
    footer.bg-ayurveda-charcoal,
    #mobile-menu {
        width: 100vw;
        left: 0;
        right: 0;
    }
    
    .hero-bg h1 {
        font-size: 2.5rem;
    }
    
    .hero-bg p {
        font-size: 1.1rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-ayurveda-gold {
        color: #000 !important;
        font-weight: bold;
    }
    
    .bg-ayurveda-gold {
        background-color: #000 !important;
        color: white !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .product-card:hover {
        transform: none;
    }
}

/* Focus indicators for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #D4A03D;
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #D4A03D;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}
