/* =========================================
   CSS - Crumb & Co.
   ========================================= */

:root {
    /* Colors - Light Theme */
    --bg-dark: #ffffff; /* Fundo Branco */
    --bg-darker: #f5f5f5; /* Cinza bem claro para seções alternadas */
    --bg-light: #fffaf0; /* Amarelo/Bege muito suave para destaque leve */
    --text-primary: #222222; /* Texto Principal Escuro */
    --text-secondary: #555555; /* Texto Secundário Cinza */
    --text-muted: #888888;
    --accent-gold: #d32f2f; /* Vermelho vibrante como principal */
    --accent-gold-hover: #b71c1c; /* Vermelho escuro no hover */
    --accent-yellow: #fbc02d; /* Amarelo/Dourado secundário */
    
    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Variables */
    --header-height: 80px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400; /* Sophisticated light weight */
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

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

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

.section {
    padding: 100px 0;
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 35px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 2px;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

.btn-outline:hover {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
}

/* =========================================
   Top Bar & Header
   ========================================= */
.top-bar {
    background-color: var(--bg-darker);
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    letter-spacing: 1px;
    z-index: 1000;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header {
    position: fixed;
    top: 38px; /* Below top bar initially */
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 999;
    transition: var(--transition);
    background-color: transparent;
}

.header.scrolled {
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-style: italic;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 50px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-list {
    display: flex;
    gap: 25px;
}

.nav-list a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.nav-list a:hover {
    color: var(--accent-gold);
}

.header-socials {
    display: flex;
    gap: 15px;
}

.header-socials a {
    color: var(--text-secondary);
}

.header-socials a:hover {
    color: var(--accent-gold);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   Hero Section
   ========================================= */
.hero-container {
    height: 400vh; /* Para o scroll-driven */
    position: relative;
    background-color: var(--bg-dark);
}

.hero-sticky {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

#heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.1) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 600px;
    margin-left: 0;
    margin-top: 180px; /* Desce o texto como solicitado */
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--text-primary);
    margin-bottom: 20px; /* Sophisticated light weight */
}

.hero-content h1 span {
    font-style: italic;
    color: var(--accent-gold);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 450px;
}

.scroll-arrow {
    display: inline-block;
    color: var(--accent-gold);
    font-size: 3rem;
    margin-top: 20px;
    animation: bounce 2s infinite;
    transition: color 0.3s ease;
}

.scroll-arrow:hover {
    color: var(--accent-gold-hover);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(15px);
    }
    60% {
        transform: translateY(7px);
    }
}

.scroll-arrow-up {
    animation: bounce-up 2s infinite;
}

@keyframes bounce-up {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

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

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

.about-text h2 {
    font-size: 2.8rem;
    color: var(--accent-gold);
    margin-bottom: 25px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-text p strong {
    color: var(--text-primary);
}

.about-text .btn {
    margin-top: 20px;
}

.about-image {
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 1px solid var(--accent-gold);
    z-index: 1;
}

.img-placeholder {
    width: 100%;
    height: 500px;
    background-color: var(--bg-dark);
    position: relative;
    z-index: 2;
    background-image: url('../img/pastries.png');
    background-size: cover;
    background-position: center;
}

/* =========================================
   Products Section
   ========================================= */
.products {
    background-color: var(--bg-dark);
}

/*
#padeiroCanvas {
    position: absolute;
    top: 40px;
    right: 5%;
    width: 280px;
    height: 280px;
    object-fit: cover;
    z-index: 1;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    pointer-events: none;
}
*/

.carousel-container {
    position: relative;
    overflow: hidden;
    padding-bottom: 20px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 30px;
}

.carousel-track .product-card {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--accent-gold);
    transform: scale(1.2);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background-color: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    padding-bottom: 25px;
    text-align: center;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
}

.img-wrapper {
    height: 300px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding: 0 15px;
}

.product-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 0 15px;
}

/* =========================================
   Features Section
   ========================================= */
.features {
    background-color: var(--bg-light);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.features-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.feature-item p {
    color: var(--text-secondary);
}

/* =========================================
   Testimonials
   ========================================= */
.testimonials {
    background-color: var(--bg-darker);
    text-align: center;
    padding: 120px 0;
}

.testimonial-content {
    max-width: 800px;
    margin: 0 auto;
}

.quote-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    opacity: 0.5;
    margin-bottom: 30px;
}

.quote {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.author {
    color: var(--accent-gold);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* =========================================
   Contact Section
   ========================================= */
.contact {
    background-color: var(--bg-dark);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-form-container h2 {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px;
    background-color: var(--bg-light);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--accent-gold);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-info i {
    color: var(--accent-gold);
}

.map-placeholder {
    margin-top: 30px;
    width: 100%;
    height: 250px;
    background-color: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: var(--bg-darker);
    padding-top: 80px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-brand h2 {
    font-size: 2rem;
    font-style: italic;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--text-primary);
}

.footer-socials a:hover {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-dark);
}

.footer-links h3, .footer-newsletter h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--text-secondary);
}

.footer-links ul li a:hover {
    color: var(--accent-gold);
}

.footer-newsletter p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-light);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.newsletter-form button {
    padding: 0 20px;
    background-color: var(--accent-gold);
    border: none;
    color: var(--bg-dark);
    cursor: pointer;
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding: 25px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   Animations & Utils
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Media Queries
   ========================================= */
@media (max-width: 992px) {
    .about-container, 
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .carousel-track .product-card {
        flex: 0 0 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-content h1 {
        font-size: 3.2rem;
    }
}

@media (max-width: 768px) {
    .top-bar {
        font-size: 0.7rem;
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .header {
        top: 52px; /* Adjust based on new top bar height */
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .nav-list a {
        font-size: 1.2rem;
    }
    
    .product-grid,
    .features-container,
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .carousel-track .product-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    #padeiroCanvas {
        width: 150px;
        height: 150px;
        top: 20px;
        opacity: 1;
    }
}
