:root {
    --bg-color: #FDFBF7;
    --text-color: #4A4A4A;
    --primary-color: #703F4A;
    --accent-color: #8C525F;
    --card-bg: #FFFFFF;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-color); color: var(--text-color); font-family: var(--font-body); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.3s ease; cursor: pointer; }

/* Header */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 5%; background-color: rgba(253, 251, 247, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(0,0,0,0.05); box-shadow: 0 4px 30px rgba(0,0,0,0.03); transition: all 0.3s ease; }
.logo { font-family: var(--font-heading); font-size: 2rem; font-weight: 600; letter-spacing: 2px; color: var(--primary-color); cursor: pointer; white-space: nowrap; }
.mobile-menu-btn { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-color); }
.nav-links { display: flex; align-items: center; }
.nav-links a { margin: 0 1.5rem; font-size: 0.9rem; font-weight: 400; text-transform: uppercase; letter-spacing: 1px; }
.nav-links > a:hover, .dropdown > a:hover { color: var(--accent-color); }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-content { 
    display: block; 
    visibility: hidden;
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    position: absolute; background-color: var(--card-bg); min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1); z-index: 1; border-radius: 8px; top: 100%; left: 50%; padding: 0.5rem 0; border: 1px solid rgba(0,0,0,0.05); 
}
.dropdown-content a { color: var(--text-color); padding: 10px 16px; text-decoration: none; display: block; margin: 0; text-align: left; text-transform: none; font-size: 0.95rem; font-weight: 400; letter-spacing: normal; transition: background-color 0.2s, color 0.2s; }
.dropdown-content a:hover { background-color: rgba(112, 63, 74, 0.05); color: var(--primary-color); }
.dropdown:hover .dropdown-content { visibility: visible; opacity: 1; transform: translate(-50%, 0); }

.nav-icons a { margin-left: 1rem; font-size: 1.2rem; transition: transform 0.2s; }
.nav-icons a:hover { transform: scale(1.1); }

/* Hero */
.hero { display: flex; align-items: center; padding: 5% 5%; min-height: 70vh; gap: 2rem; }
.hero-content { flex: 1; min-width: 0; }
.hero-content h1 { font-family: var(--font-heading); font-size: 4.5rem; line-height: 1.1; margin-bottom: 1.5rem; color: var(--primary-color); font-style: italic; }
.hero-content p { font-size: 1.1rem; margin-bottom: 2.5rem; max-width: 400px; color: #666; }
.btn-primary { background-color: var(--primary-color); color: #fff; padding: 1rem 2.5rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1.5px; border-radius: 30px; display: inline-block; border: none; cursor: pointer; transition: all 0.3s ease; text-decoration: none; box-shadow: 0 4px 10px rgba(112, 63, 74, 0.2); }
.btn-primary:hover { background-color: var(--accent-color); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(112, 63, 74, 0.3); }
.btn-primary:active { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(112, 63, 74, 0.2); }
.hero-image { flex: 1; background-color: var(--accent-color); height: 500px; border-radius: 20px; background-image: url('../images/banner.jpg'); background-size: cover; background-position: center; box-shadow: 0 20px 40px rgba(112, 63, 74, 0.1); min-width: 0; }

/* Features */
.features { display: flex; justify-content: space-around; padding: 4rem 5%; background-color: var(--card-bg); text-align: center; }
.feature .icon { font-size: 2rem; margin-bottom: 1rem; display: block; }
.feature h3 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 0.5rem; }
.feature p { font-size: 0.9rem; color: #666; }

/* Global Products */
.product-card { text-align: left; cursor: pointer; transition: transform 0.3s ease; display: flex; flex-direction: column; text-decoration: none; color: inherit; height: 100%; min-width: 0; }
.product-img { background-color: #F0EAE8; height: 350px; border-radius: 12px; margin-bottom: 1.5rem; transition: transform 0.4s ease, box-shadow 0.4s ease; box-shadow: 0 5px 15px rgba(0,0,0,0.05); position: relative; overflow: hidden; }
.product-img .img-front, .product-img .img-back { position: absolute; inset: 0; background-size: cover; background-position: center; transition: opacity 0.4s ease; border-radius: 12px; box-shadow: inset 0 0 50px rgba(0,0,0,0.5); }
.product-img .img-back { opacity: 0; }
@media (min-width: 769px) {
    .product-card:hover .product-img { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(229, 9, 20, 0.2); }
    .product-card:hover .product-img .img-front { opacity: 0; }
    .product-card:hover .product-img .img-back { opacity: 1; }
}

.product-info .category { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-color); font-weight: 500; }
.product-info h4 { font-size: 1.2rem; font-weight: 400; margin: 0.5rem 0; transition: color 0.3s ease; }
.product-card:hover .product-info h4 { color: var(--primary-color); }
.product-info { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.product-info .price { margin-top: auto; font-weight: 500; color: var(--primary-color); }

/* Showcase (Home) */
.products-showcase { padding: 5rem 5%; text-align: center; }
.products-showcase h2 { font-family: var(--font-heading); font-size: 3rem; margin-bottom: 3rem; color: var(--primary-color); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 3rem; }

/* Collection Page */
.collection-section { padding: 5rem 5%; text-align: center; }
.collection-section h2 { font-family: var(--font-heading); font-size: 3rem; margin-bottom: 1rem; color: var(--primary-color); }
.collection-section p.subtitle { margin-bottom: 2rem; color: #666; }

/* Filters */
.filter-bar { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.filter-btn { background: transparent; border: 1px solid rgba(112, 63, 74, 0.2); color: var(--text-color); padding: 0.6rem 1.5rem; border-radius: 30px; font-family: var(--font-body); font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 1px; }
.filter-btn:hover { border-color: var(--primary-color); background-color: rgba(112, 63, 74, 0.05); }
.filter-btn.active { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); box-shadow: 0 4px 15px rgba(112, 63, 74, 0.3); }

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.fade-in { animation: fadeInScale 0.4s ease forwards; }

/* Grid (4 items per row) */
.collection-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 2rem; 
}

/* Placeholders for showcase */
.placeholder-1 { background: linear-gradient(135deg, #F0EAE8, #E3D5D7); }
.placeholder-2 { background: linear-gradient(135deg, #E3D5D7, #D5BFC3); }
.placeholder-3 { background: linear-gradient(135deg, #F9F4F5, #EAE0E2); }

/* Main Content Area */
main { flex: 1; }

/* Footer */
footer { background-color: var(--primary-color); color: #fff; padding: 5rem 5% 2rem; overflow-x: hidden; width: 100%; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 3rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 3rem; margin-bottom: 2rem; }
.footer-brand h2 { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 0.5rem; }
.footer-brand { min-width: 0; word-break: break-word; }
.footer-links h4, .footer-newsletter h4 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 1.5rem; }
.footer-links { min-width: 0; }
.footer-links a { display: block; margin-bottom: 0.8rem; color: rgba(255,255,255,0.8); }
.footer-links a:hover { color: #fff; }
.footer-newsletter { min-width: 0; }
.footer-newsletter p { margin-bottom: 1.5rem; color: rgba(255,255,255,0.8); }
.input-group { display: flex; }
.input-group input { flex: 1; padding: 0.8rem; border: 1px solid rgba(0,0,0,0.1); border-right: none; border-radius: 4px 0 0 4px; outline: none; transition: border-color 0.3s, box-shadow 0.3s; min-width: 0; }
.input-group input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(112, 63, 74, 0.1); }
.input-group button { padding: 0.8rem 1.5rem; border: none; background-color: var(--accent-color); color: #fff; cursor: pointer; border-radius: 0 4px 4px 0; transition: background-color 0.3s; flex-shrink: 0; }
.input-group button:hover { background-color: var(--primary-color); }

/* Formulários Globais */
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, input[type="password"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
    border-color: var(--primary-color) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(112, 63, 74, 0.15);
}
.footer-bottom { text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* ==========================================
   RESPONSIVIDADE
   ========================================== */

@media (max-width: 1400px) { .collection-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1100px) { .collection-grid { grid-template-columns: repeat(3, 1fr); } }

@media (max-width: 768px) {
    .navbar { flex-wrap: wrap; padding: 1rem 4%; }
    .mobile-menu-btn { display: block; order: 1; }
    .nav-icons { order: 2; }
    .nav-links { display: none; width: 100%; flex-direction: column; background-color: var(--card-bg); position: absolute; top: 100%; left: 0; padding: 1rem 0; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
    .nav-links.active { display: flex; }
    .nav-links a { margin: 1rem 0; width: 100%; text-align: center; }
    .hero { flex-direction: column; text-align: center; padding-top: 2rem; }
    .hero-content h1 { font-size: 3rem; }
    .hero-content p { margin: 1.5rem auto; font-size: 1rem; }
    .hero-image { width: 100%; height: 350px; }
    .features { flex-direction: column; gap: 2rem; padding: 2.5rem 5%; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
    .collection-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .product-img { height: 250px; margin-bottom: 0.8rem; }
    .products-showcase h2, .collection-section h2 { font-size: 2.2rem; }
    
    /* Product Card Redesign (Mobile) */
    .product-info h4 { font-size: 0.95rem; line-height: 1.2; height: 2.4em; overflow: hidden; margin-bottom: 0.3rem; }
    .product-info .price { font-size: 1.1rem; }
    .product-actions { padding: 0 0.5rem 0.5rem !important; }
    .product-actions .btn-primary, .product-actions .btn-add-grid { padding: 0.4rem !important; font-size: 0.75rem !important; }
    .product-actions .grid-qty-control { padding: 0 !important; }
    .product-actions .grid-qty-control button { width: 30px !important; height: 30px !important; font-size: 1rem !important; }
    
    @keyframes mobileImageFade {
        0%, 45% { opacity: 1; }
        50%, 95% { opacity: 0; }
        100% { opacity: 1; }
    }
    .product-img .img-front.has-hover { animation: mobileImageFade 6s infinite; }
    .product-img .img-back.has-hover { animation: mobileImageFade 6s infinite; animation-delay: -3s; opacity: 1; }
    
    .dropdown { width: 100%; text-align: center; }
    .dropdown-content { position: static; transform: none !important; opacity: 1; visibility: visible; display: none; box-shadow: none; border: none; background: transparent; padding: 0; margin-top: 0.5rem; }
    .dropdown.active .dropdown-content { display: block; }

    /* Footer mobile adjustments */
    footer { padding: 3rem 5% 2rem; }
    .footer-brand h2 { font-size: 2rem; }
    .footer-links h4, .footer-newsletter h4 { font-size: 1.3rem; margin-bottom: 1rem; }

    /* Checkout mobile */
    .checkout-main { padding-top: 1.5rem !important; }

    /* Filter bar mobile */
    .filter-bar { gap: 0.5rem; margin-bottom: 2rem; }
    .filter-btn { padding: 0.5rem 1rem; font-size: 0.8rem; letter-spacing: 0.5px; }
}

@media (max-width: 480px) { 
    .collection-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .hero-content h1 { font-size: 2.5rem; }
    .logo { font-size: 1.5rem; }
    .nav-icons a { margin-left: 0.5rem; font-size: 1rem; }
    .product-img { height: 200px; }
    .product-grid { gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .products-showcase { padding: 3rem 4%; }
    .products-showcase h2 { font-size: 1.8rem; margin-bottom: 2rem; }
}

/* Extra small screens (< 360px, e.g. Galaxy S5, iPhone SE) */
@media (max-width: 360px) {
    .navbar { padding: 0.8rem 3%; }
    .logo { font-size: 1.3rem; letter-spacing: 1px; }
    .nav-icons { gap: 8px !important; }
    .nav-icons a { margin-left: 0.3rem; font-size: 0.9rem; }
    .collection-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .product-img { height: 170px; }
    .hero-content h1 { font-size: 2rem; }
    footer { padding: 2.5rem 4% 1.5rem; }
    .footer-brand h2 { font-size: 1.7rem; }
    .product-grid { grid-template-columns: 1fr; }
}

/* Cart Drawer */
.cart-drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5); z-index: 999; display: none; opacity: 0; transition: opacity 0.3s ease;
}
.cart-drawer-overlay.active { display: block; opacity: 1; }
.cart-drawer {
    position: fixed; top: 0; right: -400px; width: 400px; max-width: 100vw; height: 100vh;
    background: var(--bg-color); z-index: 1000; transition: right 0.3s ease;
    display: flex; flex-direction: column; box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}
.cart-drawer.active { right: 0; }
.cart-header { padding: 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; }
.cart-header h2 { font-family: var(--font-heading); color: var(--primary-color); font-size: 2rem; margin:0;}
.close-cart { cursor: pointer; font-size: 2rem; color: #aaa; border: none; background: transparent; }
.cart-items { flex: 1; overflow-y: auto; padding: 1.5rem; }
.cart-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.05); opacity: 0; transform: translateY(20px); animation: fadeInSlideUp 0.4s ease forwards; }
@keyframes fadeInSlideUp { to { opacity: 1; transform: translateY(0); } }
.cart-item:nth-child(1) { animation-delay: 0.1s; }
.cart-item:nth-child(2) { animation-delay: 0.2s; }
.cart-item:nth-child(3) { animation-delay: 0.3s; }
.cart-item:nth-child(4) { animation-delay: 0.4s; }

.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; background: #eee; flex-shrink: 0; }
.cart-item-details { flex: 1; min-width: 0; }
.cart-item-title { font-weight: 500; font-size: 1rem; margin-bottom: 0.2rem; overflow: hidden; text-overflow: ellipsis; }
.cart-item-variant { font-size: 0.8rem; color: #888; margin-bottom: 0.5rem; }
.cart-item-price { font-weight: 600; color: var(--primary-color); }
.cart-item-remove { cursor: pointer; color: #ff4d4d; font-size: 0.8rem; background: none; border: none; margin-top: 5px; padding: 4px 8px; border-radius: 4px; transition: 0.2s ease; margin-left: -8px; }
.cart-item-remove:hover { background: rgba(255, 77, 77, 0.1); }
.cart-footer { padding: 1.5rem; border-top: 1px solid rgba(0,0,0,0.05); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: bold; margin-bottom: 1rem; }

 @keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}
.shake {
    animation: shake 0.4s ease-in-out;
}

/* Utility Classes */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
/* Bottom Nav Mobile */
.bottom-nav-mobile { display: none; }
@media (max-width: 768px) {
    body { padding-bottom: 70px; } /* Prevent footer overlap */
    .bottom-nav-mobile {
        display: flex; justify-content: space-around; align-items: center;
        position: fixed; bottom: 0; left: 0; right: 0; height: 70px;
        background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
        box-shadow: 0 -5px 20px rgba(0,0,0,0.05); z-index: 999;
        border-top: 1px solid rgba(0,0,0,0.05); padding: 0 10px;
    }
    .bottom-nav-mobile a {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        color: #9ca3af; text-decoration: none; font-size: 0.7rem; font-weight: 500;
        transition: color 0.2s; flex: 1; height: 100%;
    }
    .bottom-nav-mobile a.active, .bottom-nav-mobile a:hover { color: var(--primary-color); }
    .bottom-nav-mobile a span.icon { font-size: 1.5rem; margin-bottom: 4px; }
    
    /* Horizontal scrolling for showcase */
    .products-showcase .product-grid {
        display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 20px;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .products-showcase .product-grid::-webkit-scrollbar { display: none; }
    .products-showcase .product-grid .product-card {
        min-width: 260px; scroll-snap-align: start; flex: 0 0 auto;
    }
}

/* Visual Categories Grid */
.visual-categories { padding: 4rem 5%; }
.visual-categories h2 { font-family: var(--font-heading); font-size: 3rem; margin-bottom: 3rem; color: var(--primary-color); text-align: center; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-block {
    position: relative; border-radius: 16px; overflow: hidden; height: 300px;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
    background-size: cover; background-position: center; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}
.cat-block::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.4) 100%);
    transition: background 0.3s;
}
.cat-block:hover { transform: translateY(-5px); }
.cat-block:hover::after { background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.5) 100%); }
.cat-block h3 {
    position: relative; z-index: 1; color: #fff; font-family: var(--font-heading);
    font-size: 2.2rem; font-style: italic; letter-spacing: 1px; text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
@media (max-width: 768px) {
    .cat-grid { grid-template-columns: 1fr; gap: 15px; }
    .cat-block { height: 200px; }
    .visual-categories h2 { font-size: 2.2rem; margin-bottom: 1.5rem; }
    .visual-categories { padding: 2rem 5%; }
}

/* Otimização do Footer Mobile (Reduzir Scroll) */
@media (max-width: 768px) {
    footer { padding: 2.5rem 5% 1.5rem; }
    .footer-content { 
        grid-template-columns: 1fr 1fr; 
        gap: 1.5rem; 
        padding-bottom: 1.5rem; 
        margin-bottom: 1.5rem;
    }
    .footer-brand { grid-column: 1 / -1; text-align: center; }
    .footer-brand h2 { font-size: 2rem; }
    
    /* Centralizar infos da marca no mobile */
    .footer-brand > div { text-align: center; margin: 0 auto; display: inline-block; }
    
    .footer-links h4 { font-size: 1.2rem; margin-bottom: 1rem; }
    .footer-links a { font-size: 0.9rem; margin-bottom: 0.6rem; }
    
    .footer-newsletter { grid-column: 1 / -1; text-align: center; }
    .footer-newsletter h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }
    .footer-newsletter p { font-size: 0.9rem; margin-bottom: 1rem; }
    
    .footer-bottom { text-align: center; font-size: 0.8rem; }
}
