/* assets/css/style.css */

/* --- 1. Global Styles & Variables --- */
:root {
    --primary-color: #008080; /* Deep Teal */
    --accent-color: #40E0D0;  /* Turquoise */
    --neutral-dark: #333333; /* Charcoal */
    --neutral-light: #f4f4f4;
    --neutral-white: #ffffff;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Lato', sans-serif;
    --header-height: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--neutral-dark);
    line-height: 1.6;
    background-color: var(--neutral-white);
}

main {
    padding-top: var(--header-height); /* Prevent content from hiding behind sticky header */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--neutral-white);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--neutral-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--neutral-white);
}

/* --- 2. Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--neutral-white);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--neutral-light);
}

.site-header.scrolled {
    height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Centered, circular logo with Dynamic Island feel */
.logo {
    position: absolute;
    left: 50%;
    top: 10px; /* Adjust to vertically center */
    transform: translateX(-50%);
    z-index: 100;
    background-color: var(--neutral-white);
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    display: block;
}

/* Glow and expand effect on hover */
.logo:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 0 25px rgba(64, 224, 208, 0.7); /* Glowing effect using --accent-color */
}

.logo-image {
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}


.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav li {
    margin: 0 1rem;
    position: relative;
}

.main-nav {
    flex: 1;
    justify-content: flex-start;
}

.main-nav a {
    color: var(--neutral-dark);
    font-weight: 600;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}
.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--neutral-white);
    list-style: none;
    padding: 0.5rem 0;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}
.dropdown li {
    margin: 0;
}
.dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    border-bottom: none;
}
.dropdown a:hover {
    background-color: var(--neutral-light);
}


.header-left-icons,
.header-right-icons {
    display: flex;
    align-items: center;
    flex: 1;
}

.header-left-icons {
    justify-content: flex-start;
}
.header-right-icons {
    justify-content: flex-end;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 1.2rem;
    color: var(--neutral-dark);
    position: relative;
}
.icon-btn:hover { color: var(--primary-color); }

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: var(--neutral-dark);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animation for cart badge */
@keyframes cart-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
}
.cart-badge.animate {
    animation: cart-bounce 0.4s ease;
}

.mobile-menu-toggle { display: none; }

.mobile-nav { display: none; }

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.search-overlay.open {
    opacity: 1;
    visibility: visible;
}

.close-search-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 3rem;
    color: var(--neutral-dark);
    cursor: pointer;
}

.search-overlay-content {
    width: 90%;
    max-width: 700px;
}

.search-form {
    display: flex;
    border-bottom: 3px solid var(--neutral-dark);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 2rem;
    padding: 0.5rem;
    font-family: var(--font-heading);
    outline: none;
}

.search-submit-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

/* --- 3. Footer --- */
.site-footer {
    background-color: #02152c; /* Darker Blue */
    color: #a9b8c7; /* Lighter text for readability */
    padding: 4rem 0 0;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #052345;
}

.footer-column {
    /* This is a general style for all columns */
}

.footer-column:first-child {
    text-align: center;
}

.footer-logo {
    max-width: 120px;
    margin-bottom: 1rem;
}

.footer-about {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.footer-heading {
    color: var(--neutral-white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: 0.8rem;
}
.footer-links a {
    color: #a9b8c7;
    transition: all 0.3s ease;
}
.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center; /* Center the social icons */
}
.social-icons a {
    color: #a9b8c7;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.social-icons a:hover {
    background-color: var(--accent-color);
    color: var(--neutral-dark);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: #7e91a8;
}

.payment-icons {
    font-size: 1.8rem;
    display: flex;
    gap: 1rem;
}

.proudly-indian {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #c0d0e0;
    letter-spacing: 0.5px;
}

.indian-flag-img {
    width: 24px;
    height: auto;
    border-radius: 3px;
}

/* --- 4. Home Page --- */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1920x800.png?text=Eyric+Banner') no-repeat center center/cover;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--neutral-white);
}
.hero-section h1 { font-size: 3.5rem; }
.subheadline { font-size: 1.2rem; margin-bottom: 2rem; }
.hero-cta .btn { margin: 0 0.5rem; }

.usp-strip {
    background-color: var(--neutral-light);
    padding: 2rem 0;
}
.usp-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.usp-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--neutral-dark);
}
.usp-item svg { color: var(--primary-color); }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    color: var(--neutral-white);
}
.category-card img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
    border-radius: 50%;
    object-fit: cover;
    height: 200px; /* Make it square for circular */
}
.category-card:hover img { transform: scale(1.1); }
.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}
.category-card-content h3 { color: var(--neutral-white); margin-bottom: 0.2rem; }
.category-card-content p { font-weight: 600; color: var(--accent-color); }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.product-card {
    border: 1px solid var(--neutral-light);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    position: relative;
}
.product-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.product-card img { width: 100%; display: block; }
.product-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--accent-color);
    color: var(--neutral-dark);
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}
.product-card-content { padding: 1rem; }
.product-card-content h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.product-card-content h3 a { color: var(--neutral-dark); }
.product-price { font-weight: 600; color: var(--primary-color); margin-bottom: 1rem; }
.product-card-actions { display: flex; gap: 0.5rem; }
.product-card-actions .btn { flex: 1; padding: 0.5rem; font-size: 0.9rem; }

.promo-banner-section { padding: 4rem 0; }
.promo-banner {
    background-color: var(--primary-color);
    color: var(--neutral-white);
    text-align: center;
    padding: 3rem;
    border-radius: 10px;
}
.promo-banner h2 { color: var(--neutral-white); }
.promo-banner .btn { background-color: var(--accent-color); color: var(--neutral-dark); }
.promo-banner .btn:hover { background-color: var(--neutral-white); }

.newsletter-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background-color: var(--neutral-light);
    padding: 2rem;
    border-radius: 10px;
}
.newsletter-form { display: flex; margin-top: 1rem; }
.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
}
.newsletter-form button { border-radius: 0 5px 5px 0; }

/* --- Testimonials --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--neutral-white);
    border: 1px solid var(--neutral-light);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.testimonial-content {
    margin-bottom: 1.5rem;
    font-style: italic;
    color: var(--neutral-dark);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary-color);
}

.testimonial-author p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: #777;
}

/* --- 5. Shop (Products/Category) Page --- */
.page-container { padding: 2rem 0; }
.page-header { text-align: center; margin-bottom: 3rem; }
.breadcrumb { margin-bottom: 1rem; font-size: 0.9rem; color: #777; }
.breadcrumb a { color: #777; }

.shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}
.shop-filters h3 { margin-bottom: 1.5rem; }
.filter-group { margin-bottom: 2rem; }
.filter-group h4 { font-size: 1.1rem; margin-bottom: 1rem; }
.filter-group ul { list-style: none; }
.filter-group li { margin-bottom: 0.5rem; }
.price-slider { width: 100%; }
.filter-btn { width: 100%; }

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--neutral-light);
}
.sort-dropdown {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.pagination { margin-top: 3rem; }
.pagination ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}
.pagination a {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.pagination a.active, .pagination a:hover {
    background-color: var(--primary-color);
    color: var(--neutral-white);
    border-color: var(--primary-color);
}

/* --- 6. Product Detail Page --- */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}
.product-gallery .main-product-image {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--neutral-light);
    margin-bottom: 1rem;
}
.thumbnail-images { display: flex; gap: 1rem; }
.thumbnail-images img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}
.thumbnail-images img.active, .thumbnail-images img:hover {
    border-color: var(--primary-color);
}

.product-info h1 { margin-bottom: 0.5rem; }
.product-tagline { color: #777; margin-bottom: 1rem; }
.product-price-detail { font-size: 2rem; font-weight: 700; color: var(--primary-color); margin-bottom: 1.5rem; }
.product-options { margin-bottom: 2rem; }
.option-group { margin-bottom: 1rem; }
.option-group label { font-weight: 600; display: block; margin-bottom: 0.5rem; }
.color-swatches { display: flex; gap: 0.5rem; }
.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ccc;
    cursor: pointer;
}
.color-swatch.active { border-color: var(--primary-color); }
.quantity-input { width: 60px; padding: 0.5rem; text-align: center; }
.product-actions { display: flex; gap: 1rem; margin-bottom: 1rem; }
.product-actions .btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.stock-status { font-weight: 600; color: green; }

.product-tabs .tab-headers {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid #ccc;
    margin-bottom: 1.5rem;
}
.tab-link {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}
.tab-link.active {
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- 7. Other Pages (About, Contact, Auth) --- */
.text-page h2 { margin-top: 2rem; }
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.icon-grid-item { text-align: center; }

.contact-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}
.contact-form .form-group { margin-bottom: 1.5rem; }
.contact-form label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.map-placeholder {
    height: 200px;
    background-color: var(--neutral-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    border-radius: 5px;
}

.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}
.auth-form-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border: 1px solid var(--neutral-light);
    border-radius: 10px;
}
.auth-form-container h2 { text-align: center; }
.auth-form .form-group { margin-bottom: 1.5rem; }
.auth-form label { display: block; margin-bottom: 0.5rem; }
.auth-form input { width: 100%; padding: 0.75rem; }
.btn-block { width: 100%; }
.auth-switch { text-align: center; margin-top: 1rem; }

/* Cart Page */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--neutral-light);
}
.cart-item img { width: 120px; height: auto; object-fit: cover; }
.cart-item-details { flex: 1; }
.cart-item-price { text-align: right; }
.remove-btn { background: none; border: none; color: red; cursor: pointer; }
.cart-summary {
    background-color: var(--neutral-light);
    padding: 1.5rem;
    border-radius: 10px;
}
.cart-summary h3 { margin-bottom: 1.5rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.summary-row.total { font-weight: 700; font-size: 1.2rem; }

/* --- 8. Responsive Design --- */
@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

@media (max-width: 992px) {
    .main-nav {
        display: none; /* Hide nav earlier to prevent overlap with logo */
    }
    .mobile-menu-toggle {
        display: block; /* Show hamburger menu earlier */
    }

    /* Ensure icon containers are visible and take up space */
    .header-left-icons, .header-right-icons {
        display: flex;
        flex: 1;
    }

    .header-right {
        display: flex; /* Show the icon container on mobile */
    }
    
    .shop-layout { grid-template-columns: 1fr; }
    .shop-filters {
        /* In a real project, this would be a collapsible panel */
        border-bottom: 1px solid #ccc;
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }
    .contact-layout, .product-detail-layout, .cart-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .hero-section h1 { font-size: 2.5rem; }

    /* Body class to prevent scrolling when menu is open */
    body.mobile-menu-open {
        overflow: hidden;
    }

    .mobile-nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px; /* Width of the slide-in menu */
        height: 100%;
        background: var(--neutral-white);
        z-index: 1500; /* Above header, below search */
        transform: translateX(-100%);
        transition: transform 0.4s ease-in-out;
        overflow-y: auto;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }
    .mobile-nav.open {
        transform: translateX(0);
    }
    .mobile-nav ul { list-style: none; }
    .mobile-nav a {
        display: block;
        padding: 1rem 5%;
        border-bottom: 1px solid var(--neutral-light);
        font-weight: 600;
        color: var(--neutral-dark);
    }
    .mobile-nav a:hover {
        background-color: var(--neutral-light);
        color: var(--primary-color);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .hero-section h1 { font-size: 2.2rem; }

    .footer-grid {
        grid-template-columns: 1fr; /* Single column for very small screens */
        text-align: center;
    }

    .footer-column:first-child, .social-icons {
        justify-content: center;
    }

    .usp-container { justify-content: center; }
}

/* --- 9. Floating WhatsApp Button --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25D366; /* WhatsApp green */
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px rgba(0,0,0,0.3);
    z-index: 1010; /* Above header, below search overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
}

/* --- 10. Animate on Scroll --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform; /* Performance optimization */
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
