/* CSS Variables */
:root {
    --cream: #FDFBF7;
    --pastel-pink: #E8B4B8;
    --chocolate-brown: #3E2723;
    --dark-brown: #2D1B18;
    --accent-gold: #D4AF37;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    --transition-speed: 0.3s;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global Responsive Rules */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
    /* Removes bottom spacing */
}

body {
    background-color: var(--cream);
    background-image: url('./images/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--chocolate-brown);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    outline: none;
}

/* Navigation Transparent */
.navbar-transparent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 80px;
    /* Slightly larger for impact */
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cream);
    /* Changed to cream to stand out on dark video */
}

/* Nav links for dark background */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--cream);
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.cta-small {
    padding: 0.8rem 2rem;
    background-color: var(--cream);
    color: var(--chocolate-brown);
    border-radius: 30px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.cta-small:hover {
    background-color: var(--accent-gold);
    color: var(--chocolate-brown);
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(62, 39, 35, 0.05);
}

/* The original .logo-container and .logo are kept for the non-transparent navbar if it's still used */
/* The original .nav-links and .nav-links a are kept for the non-transparent navbar if it's still used */
/* The original .cta-small is kept for the non-transparent navbar if it's still used */

/* Video Hero Section */
.video-hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* Removed dark overlay to use brightness contrast method instead */

.hero-center-content {
    z-index: 2;
    text-align: center;
    max-width: 80%;
}

.glass-text-container {
    padding: 3rem 5rem;
    border-radius: 30px;

    /* The Science: "Disturbance Fix" using backdrop brightness and blur */
    backdrop-filter: brightness(1.5) blur(5px);
    -webkit-backdrop-filter: brightness(1.5) blur(5px);

    /* Optional: very subtle border to define edge */
    border: 1px solid rgba(62, 39, 35, 0.1);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-title-large {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 10vw, 7rem);
    /* Fluid Typography */
    font-style: normal;
    /* Removed italic if desired, or keep it */
    font-weight: 800;
    line-height: 1.1;
    margin: 0;

    /* Golden Cheese / Premium Gold Effect */
    background: linear-gradient(135deg, #FFD700 0%, #FDB931 25%, #9C6515 50%, #FDB931 75%, #FFD700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    /* Text Shadow for "Cheese Hole"/Depth Effect */
    /* Inner shadow to mimic soft cheese texture + Drop shadow for pop */
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.3),
        -1px -1px 2px rgba(255, 255, 255, 0.4);

    filter: drop-shadow(0px 10px 15px rgba(0, 0, 0, 0.5));
}

.cta-hero-ghost {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-body);
    color: var(--chocolate-brown);
    background: transparent;
    border: 2px solid rgba(62, 39, 35, 0.5);
    /* 50% transparency */
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-hero-ghost:hover {
    background: var(--chocolate-brown);
    color: var(--cream);
    border-color: var(--chocolate-brown);
    box-shadow: 0 5px 15px rgba(62, 39, 35, 0.3);
}

/* Decorative Elements */
.decor-top-right {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: auto;
    opacity: 0.8;
    z-index: 10;
    pointer-events: none;
    transform: rotate(15deg);
}

.decor-bottom-left {
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 350px;
    height: auto;
    opacity: 0.8;
    z-index: 10;
    pointer-events: none;
    transform: rotate(-10deg);
}

/* Remove old hero styles that conflict or are unused */


/* Floating Animation */
.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Products Section */
.products-section {
    padding: 5rem 10%;
    background-color: #fff;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    color: var(--chocolate-brown);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--pastel-pink);
    margin: 1rem auto 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* More flexible min-width */
    gap: 3rem;
}

.product-card {
    background: var(--cream);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
}

/* Hover Effect: Zoom & Lift */
.product-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-image {
    height: 250px;
    overflow: hidden;
    position: relative;
    /* Essential for absolute children */
}

.card-image img,
.card-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: absolute;
    /* Stack images */
    top: 0;
    left: 0;
}

/* --- Multi-View Motion Animation --- */
.multi-view-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The second image fades in and out */
.multi-view-container img:nth-child(2) {
    animation: crossFade 6s infinite ease-in-out;
    opacity: 0;
}

@keyframes crossFade {

    0%,
    20% {
        opacity: 0;
    }

    /* Show Image 1 */
    40%,
    60% {
        opacity: 1;
    }

    /* Show Image 2 */
    80%,
    100% {
        opacity: 0;
    }

    /* Show Image 1 */
}

.product-card:hover .card-image img {
    transform: scale(1.1);
}

.card-info {
    padding: 2rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-info p {
    font-size: 0.95rem;
    color: #795548;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.price {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--chocolate-brown);
    margin-bottom: 1rem;
    display: block;
}

.add-to-cart {
    background: transparent;
    border: 2px solid var(--chocolate-brown);
    color: var(--chocolate-brown);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 700;
    transition: all var(--transition-speed);
}

.add-to-cart:hover {
    background-color: var(--chocolate-brown);
    color: var(--cream);
}

/* Footer */
.footer {
    background-color: transparent;
    /* Changed for glassmorphism */
    color: var(--cream);
    padding: 4rem 10%;
    text-align: center;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cream);
    margin-bottom: 1rem;
}

.footer h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--pastel-pink);
}

.socials {
    margin: 2rem 0;
}

.socials a {
    margin: 0 1rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.socials a:hover {
    color: var(--pastel-pink);
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .glass-text-container {
        padding: 3rem;
        backdrop-filter: brightness(1.3) blur(5px);
        /* Slightly less brightness on tablet */
    }

    .section-title {
        font-size: 2.5rem;
    }

    .products-section {
        padding: 4rem 5%;
        /* Tighten padding */
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-transparent {
        padding: 1rem 5%;
        background: rgba(0, 0, 0, 0.2);
        /* Slight contrast for menu */
    }

    .hamburger-menu {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1001;
    }

    .hamburger-menu span {
        width: 30px;
        height: 3px;
        background-color: var(--cream);
        border-radius: 5px;
        transition: all 0.3s ease;
    }

    /* Animate Hamburger */
    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70%;
        background: rgba(62, 39, 35, 0.95);
        /* Dark brown tint */
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        animation: slideInMenu 0.4s ease forwards;
    }

    .nav-links.active {
        display: flex;
    }

    @keyframes slideInMenu {
        from {
            transform: translateX(100%);
        }

        to {
            transform: translateX(0);
        }
    }

    .hero-title-large {
        font-size: 3.5rem;
        /* Smaller for mobile */
    }

    .glass-text-container {
        padding: 2rem;
        width: 90%;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        /* Smaller gap on mobile */
    }

    .products-section {
        padding: 3rem 5%;
    }
}

/* --- Advanced UI Features --- */

/* 1. Filter Buttons */
.filter-container {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 2rem;
    border: 2px solid var(--chocolate-brown);
    background: transparent;
    color: var(--chocolate-brown);
    border-radius: 30px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--chocolate-brown);
    color: var(--cream);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(62, 39, 35, 0.2);
}

/* 2. Liquid Transition Overlay */
.liquid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--chocolate-brown);
    z-index: 9999;
    transform: translateY(100%);
    pointer-events: none;
}

.liquid-overlay.melt-active {
    animation: melt 1.5s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes melt {
    0% {
        transform: translateY(100%);
        border-top-left-radius: 50% 20px;
        border-top-right-radius: 50% 20px;
    }

    40% {
        transform: translateY(0);
        border-radius: 0;
    }

    60% {
        transform: translateY(0);
        border-radius: 0;
    }

    100% {
        transform: translateY(-100%);
        border-bottom-left-radius: 50% 20px;
        border-bottom-right-radius: 50% 20px;
    }
}

/* 3. Glassmorphism */
.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    max-width: 800px;
    margin: 0 auto;
}

/* 4. Texture Zoom Modal */
.texture-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(5px);
}

.texture-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--cream);
    padding: 2rem;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    display: flex;
    gap: 2rem;
    transform: scale(0.8);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.texture-modal.open .modal-content {
    transform: scale(1);
}

.modal-content img {
    width: 50%;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-info h2 {
    font-size: 2.5rem;
    color: var(--chocolate-brown);
    margin-bottom: 1rem;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
}

/* 5. Micro-Interactions: Sparkle Particles */
.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-gold);
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle 1s linear forwards;
}

@keyframes sparkle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--mx), var(--my)) scale(0);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
    }

    .modal-content img {
        width: 100%;
        max-height: 300px;
    }
}

/* --- Cart & Checkout UI --- */

/* WhatsApp Chat Widget */
.whatsapp-chat-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #25D366;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 10002;
    transition: all 0.5s ease;
    font-weight: 700;
    border: 2px solid white;

    /* Initially Hidden */
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.whatsapp-chat-widget.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.whatsapp-chat-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.chat-icon {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
    animation: wiggle 2s infinite ease-in-out;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

/* Floating Cart Button */
.cart-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--chocolate-brown);
    color: var(--cream);
    padding: 1rem 1.2rem;
    border-radius: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    transition: transform 0.3s ease;
    border: 2px solid var(--accent-gold);
}

.cart-float:hover {
    transform: scale(1.1);
    background: var(--accent-gold);
    color: var(--chocolate-brown);
}

#cart-count {
    font-size: 1rem;
    background: var(--pastel-pink);
    color: var(--chocolate-brown);
    padding: 0.2rem 0.6rem;
    border-radius: 50%;
    margin-left: 0.5rem;
    font-weight: 700;
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10005;
    display: none;
    /* Hidden by default */
    justify-content: flex-end;
    /* Slide from right */
}

.cart-modal.open {
    display: flex;
}

.cart-content {
    width: 400px;
    max-width: 90%;
    background: var(--cream);
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.close-cart {
    align-self: flex-end;
    font-size: 2rem;
    cursor: pointer;
    color: var(--chocolate-brown);
}

.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    margin: 1.5rem 0;
    border-top: 1px solid rgba(62, 39, 35, 0.1);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(62, 39, 35, 0.1);
}

.cart-item-info h4 {
    font-size: 1rem;
    color: var(--chocolate-brown);
}

.cart-item-price {
    font-weight: 700;
    color: var(--accent-gold);
}

.quantity-controls button {
    background: #ddd;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    margin: 0 0.5rem;
}

.cart-footer {
    border-top: 2px solid var(--chocolate-brown);
    padding-top: 1rem;
}

.cart-footer h3 {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.name-input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
}

.place-order-btn {
    width: 100%;
    background: #25D366;
    /* WhatsApp Green */
    color: white;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s;
}

.place-order-btn:hover {
    background: #128C7E;
}

/* Signature Collections Section */
.signature-section {
    padding: 5rem 10%;
    /* Gradient blended with Custom Pencil Sketch SVG */
    background:
        linear-gradient(135deg, rgba(253, 251, 247, 0.95) 0%, rgba(250, 232, 224, 0.9) 100%),
        url('images/bakery_pattern.svg');
    background-size: 200px;
    /* seamless tile size */
    background-repeat: repeat;
    text-align: center;
    position: relative;
}

.signature-image-container {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(62, 39, 35, 0.1);
    transition: transform var(--transition-speed);
}

.signature-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(62, 39, 35, 0.15);
}

.signature-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive adjustment for Signature Section */
@media (max-width: 768px) {
    .signature-section {
        padding: 3rem 5%;
    }
}

/* Valentine's Special Section */
.valentine-section {
    padding: 5rem 10%;
    /* Gradient blended with Hearts Pattern SVG */
    background:
        linear-gradient(135deg, rgba(255, 192, 203, 0.8) 0%, rgba(255, 182, 193, 0.6) 100%),
        url('images/hearts_pattern.svg');
    background-size: 100px;
    background-repeat: repeat;
    text-align: center;
    position: relative;
}

.valentine-image-container {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
    transition: transform var(--transition-speed);
}

.valentine-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 105, 180, 0.4);
}

.valentine-img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .valentine-section {
        padding: 3rem 5%;
    }
}

/* Valentine's Floating Animation */
.valentine-floater {
    position: fixed;
    bottom: -10vh;
    pointer-events: none;
    z-index: 10010;
    /* Above most things, below cart modal if possible */
    animation-name: floatUpHeart;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

@keyframes floatUpHeart {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}