/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* --- THEME COLORS (CSS Variables) --- */
:root {
    /* Light Mode */
    --body-bg: #f4f4f4;
    --section-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333;
    --heading-color: #2c2c2c;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --navbar-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    --footer-bg: #2c2c2c;
    --footer-text: #ffffff;
    --footer-link: #ccc;
    --button-bg: #e74c3c;
    --toggle-color: #333;
}

.dark-mode {
    /* Dark Mode */
    --body-bg: #121212;
    --section-bg: #1e1e1e;
    --card-bg: #2d2d2d;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --navbar-bg: rgba(20, 20, 20, 0.95);
    --navbar-shadow: 0 2px 20px rgba(255, 255, 255, 0.05);
    --footer-bg: #000000;
    --footer-text: #a0a0a0;
    --footer-link: #a0a0a0;
    --button-bg: #e74c3c;
    --toggle-color: #ffffff;
}

/* Base Styles using variables */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--body-bg);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--navbar-shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 50px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--button-bg);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--button-bg);
    transition: width 0.3s ease;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--toggle-color);
    transition: color 0.3s ease;
    padding: 5px;
    display: flex;
    align-items: center;
}

.theme-toggle:hover {
    color: var(--button-bg);
}

.theme-toggle .icon {
    width: 24px;
    height: 24px;
    display: block;
}

.dark-mode .theme-toggle .moon {
    display: none;
}

.theme-toggle .sun {
    display: none;
}

.dark-mode .theme-toggle .sun {
    display: block;
}

/* Hero section (container for everything) */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slideshow container */
.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Individual slides */
.mySlides {
    display: none;
    width: 100%;
    height: 100%;
}

.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    background-color: rgba(0,0,0,0.5);
    z-index: 4;
}

.dark-mode .prev, .dark-mode .next {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Position the "next button" to the right */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* On hover, add a black background with a little more opacity */
.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

.dark-mode .prev:hover, .dark-mode .next:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Dots / indicators */
.dot-container {
    text-align: center;
    position: absolute;
    bottom: 20px;
    width: 100%;
    z-index: 2;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.dark-mode .dot {
    background-color: #555;
}

.active, .dot:hover {
    background-color: #717171;
}

.dark-mode .active, .dark-mode .dot:hover {
    background-color: #999;
}

/* Fading animation */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* Hero content (text and button) and overlay */
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Hero content specific styles */
.hero-title {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* CTA Button styles */
.cta-button {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(231, 76, 60, 0.6);
}

/* Products Section */
.products {
    padding: 100px 0;
    background: var(--section-bg);
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--heading-color);
    letter-spacing: -1px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 4rem;
    font-weight: 300;
}

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

.product-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.dark-mode .product-card {
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
}

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

.dark-mode .product-card:hover {
    box-shadow: 0 20px 50px rgba(255, 255, 255, 0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 300px;
}

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

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.quick-view {
    background: var(--card-bg);
    color: var(--text-color);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quick-view:hover {
    background: var(--button-bg);
    color: white;
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
    text-align: center;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--button-bg);
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--card-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--heading-color);
    letter-spacing: -1px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.dark-mode .about-image img {
    box-shadow: 0 20px 50px rgba(255, 255, 255, 0.1);
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--footer-text);
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--footer-text);
}

.footer-section p {
    color: var(--footer-link);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--footer-link);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--button-bg);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #444;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dark-mode .social-icon {
    background: #333;
}

.social-icon:hover {
    background: var(--button-bg);
    transform: translateY(-3px);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 25px;
    background: #444;
    color: white;
    font-size: 1rem;
}

.dark-mode .newsletter-form input {
    background: #333;
}

.newsletter-form input::placeholder {
    color: #ccc;
}

.newsletter-form button {
    background: var(--button-bg);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: var(--footer-link);
}

.dark-mode .footer-bottom {
    border-top-color: #333;
}

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

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--card-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .dark-mode .nav-menu {
        box-shadow: 0 10px 27px rgba(255, 255, 255, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-logo img {
        height: 40px;
    }

    .nav-actions {
        order: 3; /* Move actions to the end on mobile */
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

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

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

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

    .about-text h2 {
        font-size: 2rem;
    }

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

    .newsletter-form {
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }

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

    .container {
        padding: 0 15px;
    }
}

/* Smooth scrolling for all browsers */
html {
    scroll-behavior: smooth;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
/* Quick View Modal Styles */
.quick-view-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 0;
}

.quick-view-content {
    position: relative;
    background-color: var(--card-bg);
    margin: 0 auto;
    padding: 2rem;
    width: 90%;
    max-width: 900px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.close-button {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-button:hover {
    color: #000;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    margin-top: 1rem;
    align-items: start;
    max-height: calc(90vh - 4rem);
    overflow: hidden;
}

.modal-product-image {
    position: relative;
    width: 100%;
    height: 400px; /* Fixed height */
    background-color: var(--section-bg);
    border-radius: 8px;
    overflow: hidden;
}

.modal-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Changed from contain to cover */
    border-radius: 8px;
    display: block;
}

.modal-product-details {
    padding: 1rem 0;
    height: 400px; /* Match image height */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--button-bg) transparent;
}

.modal-product-details::-webkit-scrollbar {
    width: 6px;
}

.modal-product-details::-webkit-scrollbar-track {
    background: transparent;
}

.modal-product-details::-webkit-scrollbar-thumb {
    background-color: var(--button-bg);
    border-radius: 3px;
}

/* Update media queries for better mobile responsiveness */
@media (max-width: 1024px) {
    .modal-product-image {
        height: 350px;
    }
    
    .modal-product-details {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        max-height: none;
        overflow: visible;
    }

    .modal-product-image {
        height: 300px;
        margin: 0 auto;
    }

    .modal-product-details {
        height: auto;
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .quick-view-modal {
        padding: 1rem 0;
    }

    .modal-product-image {
        height: 250px;
    }
}