html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
    color: #000000;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align logo and menu to left on desktop */
}

.logo {
    height: 60px;
    width: auto;
    margin-right: 30px; /* Space between logo and menu */
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: flex-start; /* Menu items aligned to left */
    margin: 0;
}

nav li {
    margin-left: 25px;
}

nav a {
    text-decoration: none;
    color: #000000;
    font-weight: 700;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #9a0000;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    margin-left: auto; /* Push hamburger to right on mobile/tablet */
}

.hamburger span {
    background-color: #000000;
    height: 3px;
    width: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 10; /* Ensure all glass elements are above canvas */
    margin: 20px; /* Consistent margin for all glass boxes, including header */
    padding: 20px; /* Consistent padding */
}

.glass:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.glass-button {
    background: rgba(154, 0, 0, 0.8);
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 6px;
    backdrop-filter: blur(5px);
}

.glass-button:hover {
    background-color: rgba(122, 0, 0, 0.9);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(154, 0, 0, 0.3);
}

.hero {
    text-align: center;
    position: relative;
    z-index: 5;
}

.hero h1 {
    font-size: 3em;
    color: #9a0000;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.products {
    position: relative;
    z-index: 5;
}

.products h2 {
    text-align: center;
    color: #9a0000;
    margin-bottom: 40px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product {
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.product img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-radius: 8px;
}

.product img:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.product h3 a {
    text-decoration: none;
    color: #9a0000;
    font-size: 1.4em;
}

.price {
    font-weight: 700;
    color: #000000;
    margin: 15px 0;
    font-size: 1.2em;
}

.about, .faq, .contact, .cart, .checkout, .product-detail {
    position: relative;
    z-index: 5;
}

.about h1, .faq h1, .contact h1, .cart h1, .checkout h1, .product-detail h1 {
    color: #9a0000;
    margin-bottom: 30px;
}

.about-img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.faq-item {
    text-align: left;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.faq-item h3 {
    color: #9a0000;
}

.contact form, .checkout form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    padding: 20px;
    border-radius: 12px;
}

.contact label, .checkout label {
    display: block;
    margin: 10px 0 5px;
    font-weight: 700;
}

.contact input, .contact select, .contact textarea, .checkout input, .checkout select, .checkout textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(238, 238, 238, 0.5);
    font-family: 'Montserrat', sans-serif;
    border-radius: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.contact input:focus, .contact select:focus, .contact textarea:focus, .checkout input:focus, .checkout select:focus, .checkout textarea:focus {
    border-color: #9a0000;
    box-shadow: 0 0 8px rgba(154, 0, 0, 0.2);
}

.map-placeholder {
    margin-top: 30px;
    padding: 20px;
    border-radius: 12px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    border-bottom: 1px solid rgba(238, 238, 238, 0.5);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

#cart-total, #checkout-total {
    font-weight: 700;
    font-size: 1.4em;
    margin: 20px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px; /* Increased gap between photo and description */
    align-items: start;
}

.large-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.product-info {
    text-align: left;
    padding: 20px;
    border-radius: 12px;
}

.product-info p {
    margin-bottom: 15px;
}

#checkout-summary .cart-item {
    border: none;
    padding: 10px 0;
}

footer {
    text-align: center;
    position: relative;
    z-index: 5;
}

/* Canvas for particles */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Set to 0 to ensure it's behind all content */
    pointer-events: none;
}

/* Media Queries for Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 2.5em;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 40px; /* Adjusted gap for mobile stacking */
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.8);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 9;
        backdrop-filter: blur(10px);
    }

    nav ul.active {
        display: flex;
    }

    nav li {
        margin: 15px 0;
        text-align: center;
    }

    .hamburger {
        display: flex;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2em;
    }

    .hero {
        padding: 60px 0;
    }

    .products {
        padding: 40px 0;
    }

    .about, .faq, .contact, .cart, .checkout, .product-detail {
        padding: 60px 0;
    }

    .logo {
        height: 30px; /* Further reduced logo size for mobile to fit container */
    }

    .glass {
        margin: 10px; /* Slightly reduced margin for mobile fit */
    }

    .large-img, .about-img {
        max-width: 80%; /* Reduce product photo and about photo width on mobile to fit better */
        margin: 0 auto;
        display: block;
    }

    .product-info {
        padding: 10px; /* Reduce padding on mobile */
    }
}