/* 
   Repostería Malverde - Premium Design System
   Color Palette:
   - Primary: #2d5a27 (Emerald Green) - Inspired by the name Malverde
   - Secondary: #d4af37 (Metallic Gold/Champagne) 
   - Background: #fffdf5 (Soft Cream)
   - Dark accent: #1a2a1a (Deep Forest)
*/

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Inter:wght@300;400;500&family=Cormorant+Garamond:ital,wght@1,400;1,600&display=swap');

:root {
    --primary-color: #1b3d17;
    --primary-hover: #12290f;
    --secondary-color: #c5a059;
    --secondary-hover: #d4af37;
    --dark-color: #0f160f;
    --light-bg: #f4f1e6;
    --text-color: #2c3e2c;
    --white: #ffffff;
    --border-color: rgba(216, 220, 216, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --container-width: 1100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, .serif {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--dark-color);
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Placeholders --- */
.img-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f4f3ed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    border: 1px solid #eee;
    min-height: 250px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.img-placeholder::before {
    content: "✦";
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.img-placeholder::after {
    content: "Malverde Photography";
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9998;
    padding: 20px 0;
    background: transparent;
    transition: var(--transition);
}

header.scrolled {
    padding: 15px 0;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: var(--white);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 30px;
}

/* Hide regular nav links on mobile, show hamburger */
@media (max-width: 1024px) {
    .nav-links {
        display: none; /* Hide by default, will be shown as mobile menu */
    }
    
    .nav-links.active {
        display: flex; /* Show when active */
    }
}

.nav-links a {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Mobile Menu - Hidden by default */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    background: var(--secondary-color);
    border: 2px solid var(--white);
    border-radius: 8px;
    z-index: 9999;
    transition: all 0.3s ease;
    position: relative;
    width: 48px;
    height: 48px;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Hide hamburger on desktop only */
@media (min-width: 1025px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Show hamburger on mobile and tablet */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.2);
    border-color: var(--secondary-color);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
    display: block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile menu styles - simplified and working */
@media (max-width: 1024px) {
    /* Hide regular nav links on mobile */
    .nav-links:not(.active) {
        display: none !important;
    }
    
    /* Mobile menu panel */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--primary-color);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 100px 30px 30px;
        gap: 5px;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 20px rgba(0,0,0,0.3);
        overflow-y: auto;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        width: 100%;
        margin: 0;
    }
    
    .nav-links a {
        display: block;
        padding: 18px 25px;
        color: var(--white);
        font-size: 1.1rem;
        font-weight: 500;
        border-radius: 8px;
        transition: all 0.3s ease;
        text-align: left;
        border: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .nav-links a:hover {
        background: var(--secondary-color);
        color: var(--dark-color);
        border-color: var(--secondary-color);
        transform: translateX(0);
    }
    
    .nav-links a.active {
        background: var(--secondary-color);
        color: var(--dark-color);
        border-color: var(--white);
    }
    
    /* Mobile menu overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Close button for mobile menu */
    .mobile-menu-close {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-close:hover {
        background: rgba(255,255,255,0.2);
        border-color: var(--secondary-color);
    }
    
    .mobile-menu-close::before,
    .mobile-menu-close::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2px;
        background: var(--white);
    }
    
    .mobile-menu-close::before {
        transform: rotate(45deg);
    }
    
    .mobile-menu-close::after {
        transform: rotate(-45deg);
    }
}

/* --- Hero --- */
.hero {
    height: 100vh;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.2)), url('../assets/img/hero/main-hero.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Left aligned content for variation */
    text-align: left;
    color: var(--white);
    position: relative;
}

/* Hero Placeholder fallback */
.hero.placeholder {
    background: var(--dark-color);
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 30px;
}

/* --- Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    display: inline-block;
    padding: 16px 45px;
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.6s;
    z-index: -1;
}

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

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(27, 61, 23, 0.2);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color) !important;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white) !important;
}

/* Specific button style for dark backgrounds (Hero) */
.hero .btn-outline {
    border-color: var(--white);
    color: var(--white) !important;
}

.hero .btn-outline:hover {
    background-color: var(--white);
    color: var(--dark-color) !important;
}

.bg-dark-emerald {
    background-color: var(--primary-color);
    color: var(--white);
}

.bg-dark-emerald h1, .bg-dark-emerald h2, .bg-dark-emerald h3, .bg-dark-emerald span {
    color: var(--white);
}

.bg-dark-emerald .section-title span {
    color: var(--secondary-color);
}

.bg-cream {
    background-color: var(--light-bg);
}

/* --- Section Styling --- */
section {
    padding: 120px 0; /* More breathing room */
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title span {
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 2.5rem;
}

/* --- About Preview --- */
.about-preview {
    background-color: var(--light-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text h3 {
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 30px;
    color: #666;
}

.about-img {
    height: 500px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    text-align: center;
    transition: var(--transition);
    padding-bottom: 30px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.product-img-container {
    height: 300px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

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

.product-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.product-card .price {
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Footer --- */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-col p, .footer-col li {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #777;
}

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 9999;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
}

/* Typography Details */
.drop-cap::first-letter {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    float: left;
    margin-right: 10px;
    line-height: 1;
    color: var(--secondary-color);
}

/* Hero Parallax Emulation */
.parallax-bg {
    background-attachment: fixed;
}

/* Responsive */
@media (max-width: 768px) {
    /* Mobile specific improvements */
    .hero {
        padding: 100px 0 80px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-img {
        height: 350px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    /* Mobile touch improvements */
    .btn {
        padding: 15px 25px;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
    
    .section-title {
        text-align: center;
        margin-bottom: 40px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .section-title span {
        font-size: 1rem;
    }
}

/* Tablet improvements */
@media (max-width: 1024px) and (min-width: 769px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-img {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .container {
        padding: 0 25px;
    }
}

/* Large mobile */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
    }
    
    .product-card {
        padding: 20px 15px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .hero-btns {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-btns .btn {
        width: 100%;
        text-align: center;
    }
}
