/* ==========================================================================
   1. CONFIGURAÇÕES GERAIS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', Georgia, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F8F2E3;
    color: #6E5F55;
    overflow-x: hidden;
    animation: pageFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Seleção de texto personalizada */
::selection {
    background-color: #D39F2D;
    color: #FDFDFD;
}

/* Scrollbar personalizada (boas práticas visuais de e-commerce) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #6E5F55;
}

::-webkit-scrollbar-thumb {
    background-color: #A39385;
    border-radius: 20px;
    border: 2px solid #6E5F55;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #6E5F55;
}

html {
    scrollbar-width: thin;
    scrollbar-color: #A39385 #6E5F55;
}

/* Respeita utilizadores que preferem menos animação */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   2. NAVBAR / CABEÇALHO (Centralizado e Simétrico)
   ========================================================================== */
.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "left logo right";
    align-items: center;
    gap: 20px;
    padding: 10px 5%;
    background-color: rgba(250, 246, 243, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(110, 95, 85, 0.1);
    box-shadow: 0 2px 12px rgba(110, 95, 85, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-left {
    grid-area: left;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.logo-container {
    grid-area: logo;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-logo-img {
    height: 95px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-container:hover .main-logo-img {
    transform: scale(1.04) rotate(-1deg);
}

.nav-right {
    grid-area: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
}

/* ==========================================================================
   2.1 CAMPO DE PESQUISA DO CABEÇALHO (estilo e-commerce)
   ========================================================================== */
.nav-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 320px;
    background-color: #FDFDFD;
    border: 1px solid rgba(110, 95, 85, 0.18);
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    transition: border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-search-form:focus-within {
    border-color: #D39F2D;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.nav-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.85rem;
    color: #6E5F55;
    padding: 6px 4px;
}

.nav-search-input::placeholder {
    color: #A39385;
}

.nav-search-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background-color: #6E5F55;
    color: #FDFDFD;
    cursor: pointer;
    transition: background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-search-btn:hover {
    background-color: #D39F2D;
}

.nav-search-btn:active {
    transform: scale(0.92);
}

.nav-search-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* ==========================================================================
   2.1.1 BARRA DE PESQUISA DO CABEÇALHO (ao lado do menu, dentro da navbar)
   ========================================================================== */
.nav-search-wrapper {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.nav-search-wrapper .nav-search-form {
    max-width: 320px;
}

@media (max-width: 768px) {
    .nav-search-wrapper {
        flex: 1 1 120px;
    }

    .nav-search-wrapper .nav-search-form {
        max-width: none;
        padding: 3px 3px 3px 12px;
    }

    .nav-search-wrapper .nav-search-input {
        font-size: 0.8rem;
    }

    .nav-search-wrapper .nav-search-btn {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .nav-search-wrapper .nav-search-input {
        display: none;
    }

    .nav-search-wrapper .nav-search-form {
        padding: 3px;
        border-radius: 50%;
        background-color: transparent;
        border: none;
    }

    .nav-search-wrapper .nav-search-form:focus-within {
        box-shadow: none;
    }
}

/* ==========================================================================
   2.2 BARRA DE PESQUISA DO CATÁLOGO (abaixo de "Mais vendidos")
   ========================================================================== */
.catalog-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 420px;
    margin: 18px auto 30px;
    background-color: #FDFDFD;
    border: 1px solid rgba(110, 95, 85, 0.18);
    border-radius: 24px;
    padding: 4px 4px 4px 18px;
    box-shadow: 0 4px 15px rgba(110, 95, 85, 0.06);
    transition: border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.catalog-search-form:focus-within {
    border-color: #D39F2D;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.catalog-search-form .nav-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    color: #6E5F55;
    padding: 8px 4px;
}

.catalog-search-form .nav-search-btn {
    flex-shrink: 0;
}

.nav-back-link {
    font-size: 0.8rem;
    opacity: 0.85;
}

/* Saudação e link para o perfil dentro do bloco de usuário */
.nav-user-greeting {
    margin-right: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #6E5F55;
    white-space: nowrap;
}

.btn-profile-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6E5F55;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid rgba(110, 95, 85, 0.25);
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-profile-link:hover {
    background-color: #D39F2D;
    border-color: #D39F2D;
    color: #FDFDFD;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.35);
}

/* Ícone do Carrinho na Home */
.cart-icon-container {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
}

.cart-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-icon-container:hover .cart-icon-img {
    transform: scale(1.12) rotate(-8deg);
}

.cart-icon-container:active .cart-icon-img {
    transform: scale(0.92);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #D39F2D;
    color: #FDFDFD;
    font-size: 0.75rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 0 0 2px #F8F2E3;
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-icon-container:hover .cart-count {
    transform: scale(1.15);
}

/* Elementos exclusivos da Navbar no Carrinho */
.btn-back-catalog {
    color: #6E5F55;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.btn-back-catalog:hover {
    color: #D39F2D;
}

.user-profile-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background-color: #FDFDFD;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(110, 95, 85, 0.15);
    transition: box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.user-profile-nav:hover {
    box-shadow: 0 4px 15px rgba(110, 95, 85, 0.06);
}

/* Botão de login/logout (antes sem estilo próprio) */
.btn-logout {
    background-color: transparent;
    border: 1px solid rgba(110, 95, 85, 0.25);
    color: #6E5F55;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
}

.btn-logout:hover {
    background-color: #D39F2D;
    border-color: #D39F2D;
    color: #FDFDFD;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.35);
}

.btn-logout:active {
    transform: translateY(0) scale(0.97);
}

.user-avatar-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6E5F55;
}

/* ==========================================================================
   3. HERO BANNER (Página Inicial)
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(30, 22, 15, 0.75) 0%, rgba(30, 22, 15, 0.15) 55%, rgba(30, 22, 15, 0.25) 100%);
    pointer-events: none;
}

.hero-image-wrapper {
    width: 100%;
    height: 100%;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(78%);
    transform: scale(1.02);
    animation: heroZoom 12s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from { transform: scale(1.02); }
    to { transform: scale(1.1); }
}

.hero-overlay {
    position: absolute;
    bottom: 40px;
    left: 5%;
    z-index: 1;
    color: #FDFDFD;
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.5);
    animation: heroTextRise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroTextRise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-overlay h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(197, 160, 89, 0.9);
    color: #FDFDFD;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
    position: relative;
}

.hero-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FDFDFD;
    margin-right: 6px;
    animation: badgePulse 1.6s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.4); }
}

.hero-overlay p {
    font-size: 1.1rem;
    max-width: 500px;
}

/* ==========================================================================
   4. CATÁLOGO DE PRODUTOS (index.html)
   ========================================================================== */
.catalog-container {
    padding: 60px 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    color: #6E5F55;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #D39F2D;
    margin: 14px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-style: italic;
    color: #A39385;
    margin-bottom: 40px;
}

/* Grid padrão para computador (3 Colunas Fixas) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
}

/* Cards dos Produtos */
.product-card {
    background-color: #FDFDFD;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(110, 95, 85, 0.06);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(110, 95, 85, 0.05);
    animation: cardFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Efeito cascata: cada card seguinte entra com um pequeno atraso */
.products-grid .product-card:nth-child(1) { animation-delay: 0.02s; }
.products-grid .product-card:nth-child(2) { animation-delay: 0.08s; }
.products-grid .product-card:nth-child(3) { animation-delay: 0.14s; }
.products-grid .product-card:nth-child(4) { animation-delay: 0.20s; }
.products-grid .product-card:nth-child(5) { animation-delay: 0.26s; }
.products-grid .product-card:nth-child(6) { animation-delay: 0.32s; }

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(110, 95, 85, 0.14);
    border-color: rgba(197, 160, 89, 0.35);
}

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

.product-img-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #E8CE95;
}

.product-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Sutil sombra de vinheta na base da imagem para dar profundidade */
.product-img-container::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 40%;
    background: linear-gradient(0deg, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
}

.product-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #D39F2D;
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    box-shadow: 0 3px 10px rgba(197, 160, 89, 0.4);
    transform: translateY(0) scale(1);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-tag {
    transform: translateY(2px) scale(1.05);
}

.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-info {
    padding: 20px;
}

.product-card-link .product-info {
    padding-bottom: 0;
}

.product-info-footer {
    padding-top: 12px;
}

.product-info-description {
    padding-top: 12px;
    padding-bottom: 0;
}

.product-info h3 {
    font-size: 1.2rem;
    color: #6E5F55;
    margin-bottom: 0;
    font-family: 'Playfair Display', Georgia, serif;
    transition: color 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card-link:hover .product-info h3 {
    color: #A9781E;
}

.product-ingredients {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag-ing {
    background-color: #F8F2E3;
    color: #A39385;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(163, 147, 133, 0.3);
    transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.tag-ing:hover {
    background-color: #D39F2D;
    color: #FDFDFD;
    border-color: #D39F2D;
}

.product-description {
    font-size: 0.9rem;
    color: #A39385;
    line-height: 1.4;
    margin-bottom: 20px;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #6E5F55;
    transition: color 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-price {
    color: #A9781E;
}

.btn-add-cart {
    position: relative;
    overflow: hidden;
    background-color: #6E5F55;
    color: #FDFDFD;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    transition: background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Efeito de brilho que "passa" pelo botão no hover, comum em e-commerces premium */
.btn-add-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-add-cart:hover {
    background-color: #D39F2D;
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.35);
    transform: translateY(-2px);
}

.btn-add-cart:hover::before {
    left: 130%;
}

.btn-add-cart:active {
    transform: translateY(0) scale(0.96);
}

.btn-add-cart:disabled {
    background-color: #A39385;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Botão de compra (Comprar) — verde, usado no catálogo e na página do produto */
.btn-comprar {
    background-color: #3f8a4c;
}

.btn-comprar:hover {
    background-color: #2f6b3a;
    box-shadow: 0 8px 20px rgba(63, 138, 76, 0.35);
}

.btn-comprar:disabled {
    background-color: #A39385;
}

/* ==========================================================================
   5. TELA DO CARRINHO DE COMPRAS (carrinho.html)
   ========================================================================== */
.cart-container {
    padding: 40px 5%;
    max-width: 1300px;
    margin: 0 auto;
    min-height: 70vh;
}

.cart-page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    color: #6E5F55;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(110, 95, 85, 0.1);
    padding-bottom: 15px;
    animation: heroTextRise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Estrutura Master/Detail em duas colunas */
.cart-layout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* 5.1 Coluna da Esquerda: Itens */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    max-height: 560px;
    overflow-y: auto;
    padding-right: 8px;
}

@media (max-width: 768px) {
    .cart-items-list {
        max-height: 60vh;
    }
}

.cart-item-card {
    display: flex;
    align-items: center;
    background-color: #FDFDFD;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(110, 95, 85, 0.08);
    position: relative;
    gap: 20px;
    transition: box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    animation: cardFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cart-item-card:hover {
    box-shadow: 0 8px 25px rgba(110, 95, 85, 0.14);
    transform: translateY(-2px);
}

.cart-item-img-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-item-card:hover .cart-item-img-preview {
    transform: scale(1.06);
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h3 {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    color: #6E5F55;
    margin-bottom: 4px;
}

.cart-item-meta {
    font-size: 0.8rem;
    color: #A39385;
    margin-bottom: 6px;
}

.cart-item-price-unit {
    font-size: 0.95rem;
    font-weight: bold;
    color: #D39F2D;
}

/* Controles de Quantidade */
.cart-item-quantity-controls {
    display: flex;
    align-items: center;
    background-color: #F8F2E3;
    border: 1px solid rgba(110, 95, 85, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.btn-qty {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.1rem;
    color: #6E5F55;
    transition: background-color 0.18s cubic-bezier(0.22, 1, 0.36, 1), transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-qty:hover {
    background-color: rgba(197, 160, 89, 0.15);
}

.btn-qty:active {
    transform: scale(0.85);
}

.qty-value {
    width: 30px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-item-subtotal {
    font-size: 1.1rem;
    font-weight: bold;
    color: #6E5F55;
    min-width: 100px;
    text-align: right;
    transition: color 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-remove-item {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #A39385;
    cursor: pointer;
    transition: color 0.18s cubic-bezier(0.22, 1, 0.36, 1), transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 0 5px;
}

.btn-remove-item:hover {
    color: #D83232;
    transform: rotate(90deg) scale(1.15);
}

.btn-remove-item:active {
    transform: rotate(90deg) scale(0.9);
}

/* 5.2 Caixa do Formulário de Envio / Morada */
.cart-shipping-form-box {
    background-color: #FDFDFD;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid rgba(110, 95, 85, 0.08);
    margin-bottom: 25px;
}

.form-section-title {
    font-family: 'Georgia', serif;
    font-size: 1.3rem;
    color: #6E5F55;
    margin-bottom: 20px;
    border-bottom: 1px dashed rgba(110, 95, 85, 0.15);
    padding-bottom: 8px;
}

.form-group-full {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.form-row-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.span-2 {
    grid-column: span 2;
}

.cart-shipping-form-box label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6E5F55;
}

.cart-shipping-form-box input {
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid rgba(110, 95, 85, 0.2);
    font-size: 0.9rem;
    color: #6E5F55;
    background-color: #F8F2E3;
    width: 100%;
    transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-shipping-form-box input:hover {
    border-color: rgba(197, 160, 89, 0.5);
}

.cart-shipping-form-box input:focus {
    outline: none;
    border-color: #D39F2D;
    background-color: #FDFDFD;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.cep-field-wrapper {
    display: flex;
    gap: 6px;
}

.btn-inline-cep {
    background-color: #6E5F55;
    color: white;
    border: none;
    padding: 0 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background-color 0.18s cubic-bezier(0.22, 1, 0.36, 1), transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-inline-cep:hover {
    background-color: #D39F2D;
}

.btn-inline-cep:active {
    transform: scale(0.94);
}

/* 5.3 Mensagem para o Vendedor */
.cart-seller-notes {
    background-color: #FDFDFD;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(110, 95, 85, 0.08);
}

.cart-seller-notes label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #6E5F55;
}

.cart-seller-notes textarea {
    width: 100%;
    height: 90px;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid rgba(110, 95, 85, 0.2);
    background-color: #F8F2E3;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: #6E5F55;
}

.cart-seller-notes textarea:focus {
    outline: none;
    border-color: #D39F2D;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

/* 5.4 Coluna da Direita: Bloco de Checkout/Resumo */
.checkout-summary-box {
    background-color: #FDFDFD;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(197, 160, 89, 0.25);
    box-shadow: 0 4px 15px rgba(110, 95, 85, 0.06);
    position: sticky;
    top: 110px;
    transition: box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.checkout-summary-box:hover {
    box-shadow: 0 8px 25px rgba(110, 95, 85, 0.14);
}

.checkout-summary-box h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    color: #6E5F55;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(110, 95, 85, 0.1);
    padding-bottom: 10px;
}

.shipping-selector-wrapper {
    margin-bottom: 25px;
}

.summary-section-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6E5F55;
    margin-bottom: 10px;
}

.info-alert-text {
    font-size: 0.85rem;
    color: #A39385;
    font-style: italic;
    background-color: #F8F2E3;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #D39F2D;
    line-height: 1.4;
}

.shipping-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shipping-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 6px;
    transition: background-color 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.shipping-option-item:hover {
    background-color: #F8F2E3;
}

.shipping-name {
    flex: 1;
}

.shipping-price {
    font-weight: bold;
}

/* Formas de Pagamento Estilizadas */
.payment-methods-section {
    margin-bottom: 25px;
}

.payment-methods-section h4 {
    font-size: 0.9rem;
    color: #6E5F55;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-checkbox-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border: 1px solid rgba(110, 95, 85, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.payment-checkbox-card input[type="radio"] {
    display: none; 
}

.custom-radio-box {
    width: 18px;
    height: 18px;
    border: 2px solid #A39385;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.payment-checkbox-card input[type="radio"]:checked + .custom-radio-box {
    border-color: #D39F2D;
}

.payment-checkbox-card input[type="radio"]:checked + .custom-radio-box::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: #D39F2D;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.payment-checkbox-card:hover {
    background-color: #F8F2E3;
}

.payment-label-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.payment-label-text strong {
    font-size: 0.95rem;
    color: #6E5F55;
}

.payment-label-text small {
    font-size: 0.75rem;
    color: #A39385;
}

/* Precificação Final */
.price-breakdown {
    margin-top: 20px;
    margin-bottom: 25px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #A39385;
}

.summary-divider {
    border: 0;
    border-top: 1px solid rgba(110, 95, 85, 0.15);
    margin: 12px 0;
}

.total-row {
    font-size: 1.3rem;
    font-weight: bold;
    color: #6E5F55;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.78rem;
    color: #A39385;
    line-height: 1.4;
    margin-bottom: 16px;
    cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #D39F2D;
    cursor: pointer;
}

.consent-checkbox a {
    color: #6E5F55;
    font-weight: 600;
    text-decoration: underline;
}

.consent-checkbox a:hover {
    color: #D39F2D;
}

.btn-finish-checkout {
    width: 100%;
    background-color: #6E5F55;
    color: #FDFDFD;
    border: none;
    padding: 14px;
    border-radius: 4px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
}

.btn-finish-checkout:hover {
    background-color: #D39F2D;
}

/* ==========================================================================
   6. MODAL INTERNO DE LOGIN DO GOOGLE (index.html)
   ========================================================================== */
.modal-container {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(110, 95, 85, 0.6); 
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: #F8F2E3;
    padding: 40px;
    border-radius: 8px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(197, 160, 89, 0.4);
}

.modal-title {
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    color: #6E5F55;
    margin-bottom: 15px;
}

.modal-text {
    font-size: 0.95rem;
    color: #A39385;
    margin-bottom: 25px;
    line-height: 1.5;
}

.btn-google-login-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #FDFDFD;
    border: 1px solid rgba(110, 95, 85, 0.3);
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    color: #6E5F55;
    font-weight: 500;
    width: 100%;
    margin-bottom: 15px;
    transition: background-color 0.3s;
}

.btn-google-login-modal img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.btn-google-login-modal:hover {
    background-color: #E8CE95;
}

.btn-close-modal {
    background: none;
    border: none;
    color: #A39385;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
}

/* ==========================================================================
   7. RODAPÉ DO SITE
   ========================================================================== */
.site-footer {
    background-color: #6E5F55;
    color: #E8CE95;
    margin-top: 60px;
    padding: 50px 5% 0;
}

.footer-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 30px;
    padding-bottom: 35px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-logo {
    height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    margin-bottom: 12px;
}

.footer-about {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #E8CE95;
}

.footer-col h4 {
    font-family: 'Georgia', serif;
    font-size: 1rem;
    color: #FDFDFD;
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links li {
    font-size: 0.85rem;
    color: #E8CE95;
    line-height: 1.4;
}

.footer-links a {
    color: #E8CE95;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: #D39F2D;
    text-decoration: underline;
}

.footer-legal-data em {
    display: block;
    font-size: 0.75rem;
    color: #D39F2D;
    font-style: italic;
    margin-top: 2px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0 25px;
    font-size: 0.8rem;
    color: #E8CE95;
}

.footer-bottom strong {
    color: #FDFDFD;
}

.footer-note {
    margin-top: 6px;
    font-size: 0.75rem;
    color: #D39F2D;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

/* ==========================================================================
   9. ACESSIBILIDADE / FOCO DE TECLADO
   ========================================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D39F2D;
    outline-offset: 2px;
}

/* ==========================================================================
   10. BREADCRUMB (navegação estrutural)
   ========================================================================== */
.breadcrumb {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 5% 0;
    font-size: 0.85rem;
    color: #A39385;
}

.breadcrumb a {
    color: #6E5F55;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #D39F2D;
    text-decoration: underline;
}

/* ==========================================================================
   11. PÁGINA DE DETALHE DO PRODUTO
   ========================================================================== */
.product-detail-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 5% 70px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.product-detail-img-wrapper {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 9 / 16;
    border-radius: 10px;
    overflow: hidden;
    background-color: #FDFDFD;
    box-shadow: 0 4px 20px rgba(110, 95, 85, 0.08);
    margin: 0 auto;
}

.product-detail-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info h1 {
    font-family: 'Georgia', serif;
    font-size: 2rem;
    color: #6E5F55;
    margin-bottom: 12px;
}

.stock-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 18px;
}

.stock-badge.in-stock {
    background-color: rgba(80, 150, 90, 0.12);
    color: #3f8a4c;
}

.stock-badge.out-stock {
    background-color: rgba(217, 83, 79, 0.12);
    color: #D83232;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: bold;
    color: #6E5F55;
    margin-bottom: 5px;
}

.product-detail-installment {
    font-size: 0.85rem;
    color: #A39385;
    margin-bottom: 25px;
}

.product-detail-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6E5F55;
    margin-bottom: 25px;
}

.product-detail-description h3 {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.product-detail-purchase-box {
    background-color: #FDFDFD;
    border: 1px solid rgba(110, 95, 85, 0.1);
    border-radius: 8px;
    padding: 22px;
    margin-bottom: 22px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.quantity-selector label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6E5F55;
}

.quantity-stepper {
    display: inline-flex;
    align-items: center;
    background-color: #F8F2E3;
    border: 1px solid rgba(110, 95, 85, 0.18);
    border-radius: 999px;
    padding: 4px;
    box-shadow: inset 0 1px 2px rgba(110, 95, 85, 0.06);
}

.quantity-stepper .qty-btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background-color: #FDFDFD;
    color: #6E5F55;
    font-family: 'Poppins', Georgia, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(110, 95, 85, 0.18);
    transition: background-color 0.18s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.quantity-stepper .qty-btn:hover:not(:disabled) {
    background-color: #D39F2D;
    color: #FDFDFD;
    box-shadow: 0 3px 8px rgba(197, 160, 89, 0.35);
}

.quantity-stepper .qty-btn:active:not(:disabled) {
    transform: scale(0.9);
}

.quantity-stepper .qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

.quantity-stepper input[type="number"] {
    width: 44px;
    padding: 0;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #6E5F55;
    -moz-appearance: textfield;
}

.quantity-stepper input[type="number"]:focus {
    outline: none;
}

.quantity-stepper input[type="number"]::-webkit-outer-spin-button,
.quantity-stepper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-detail-info .btn-add-cart {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.product-policy-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.85rem;
    color: #A39385;
}

.product-policy-list li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.product-policy-list li::before {
    content: '✓';
    color: #D39F2D;
    font-weight: bold;
}

.product-not-found {
    text-align: center;
    padding: 80px 20px;
    color: #6E5F55;
}

.product-not-found a {
    color: #D39F2D;
    font-weight: 600;
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* ==========================================================================
   12. PÁGINAS INSTITUCIONAIS / LEGAIS
   ========================================================================== */
.legal-page {
    max-width: 850px;
    margin: 0 auto;
    padding: 40px 5% 80px;
    color: #6E5F55;
    line-height: 1.7;
}

.legal-page h1 {
    font-family: 'Georgia', serif;
    font-size: 2rem;
    margin-bottom: 8px;
}

.legal-page .legal-updated {
    font-size: 0.8rem;
    color: #A39385;
    margin-bottom: 30px;
    font-style: italic;
}

.legal-page h2 {
    font-family: 'Georgia', serif;
    font-size: 1.3rem;
    margin-top: 30px;
    margin-bottom: 10px;
    color: #6E5F55;
}

.legal-page p,
.legal-page li {
    font-size: 0.95rem;
    color: #6E5F55;
    margin-bottom: 12px;
}

.legal-page ul,
.legal-page ol {
    padding-left: 22px;
    margin-bottom: 15px;
}

.legal-page .legal-highlight {
    background-color: #FDFDFD;
    border-left: 3px solid #D39F2D;
    padding: 15px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.legal-page a {
    color: #B8860B;
    font-weight: 600;
    text-decoration: underline;
}

.legal-page a:hover,
.legal-page a:focus-visible {
    color: #96690A;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 25px 0;
}

.contact-card {
    background-color: #FDFDFD;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(110, 95, 85, 0.08);
}

.contact-card h3 {
    font-family: 'Georgia', serif;
    font-size: 1rem;
    margin-bottom: 6px;
    color: #6E5F55;
}

.contact-card p {
    font-size: 0.85rem;
    color: #A39385;
    margin-bottom: 0;
}

.contact-card a {
    color: #B8860B;
    font-weight: 600;
    text-decoration: underline;
}

.contact-card a:hover,
.contact-card a:focus-visible {
    color: #96690A;
}

/* ==========================================================================
   8. MEDIA QUERIES (Responsividade Total Mobile)
   ========================================================================== */

/* 8.1 Ajustes para Tablets e ecrãs intermédios */
@media (max-width: 992px) {
    .cart-layout-grid {
        grid-template-columns: 1fr; /* Quebra em bloco único vertical */
        gap: 30px;
    }
}

/* 8.2 Ajustes para Celular (Mobile) */
@media (max-width: 768px) {
    /* Navbar Responsiva: logo + conta na primeira linha, pesquisa ocupa a linha de baixo */
    .navbar {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "logo right"
            "left left";
        row-gap: 12px;
        column-gap: 15px;
    }
    .nav-left {
        width: 100%;
        align-items: center;
        justify-content: flex-start;
    }
    .nav-search-form { max-width: none; }
    .nav-back-link { align-self: center; }
    .logo-container { justify-content: flex-start; }
    .nav-right { justify-content: flex-end; }
    .main-logo-img { height: 65px; }

    /* Força EXATAMENTE 2 COLUNAS no telemóvel para o catálogo */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px; 
    }

    .product-img-container {
        height: 180px;
    }

    .product-info {
        padding: 12px;
    }
    
    .product-info h3 {
        font-size: 1rem;
    }
    
    .product-description {
        font-size: 0.8rem;
        height: auto;
        margin-bottom: 10px;
    }
    
    .product-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .btn-add-cart {
        width: 100%;
        text-align: center;
        padding: 8px;
    }

    /* Elementos do Carrinho no Mobile */
    .cart-item-card {
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px;
    }
    
    .cart-item-details {
        min-width: 150px;
    }
    
    .cart-item-subtotal {
        width: 100%;
        text-align: left;
        border-top: 1px dashed rgba(110, 95, 85, 0.1);
        padding-top: 10px;
    }

    .btn-remove-item {
        position: absolute;
        top: 10px;
        right: 10px;
    }
}

/* 8.3 Ajuste do formulário de morada em ecrãs muito pequenos */
@media (max-width: 600px) {
    .form-row-grid-3 {
        grid-template-columns: 1fr; /* Passa os campos paralelos para linhas únicas */
    }
    
    .form-group.span-2 {
        grid-column: span 1;
    }
    
    .cart-shipping-form-box {
        padding: 15px;
    }
}

/* ==========================================================================
   13. PÁGINA "MEU PERFIL" (edição de dados da conta)
   ========================================================================== */
.profile-page-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 5% 80px;
    min-height: 60vh;
}

.profile-page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    color: #6E5F55;
    margin-bottom: 6px;
    border-bottom: 2px solid rgba(110, 95, 85, 0.1);
    padding-bottom: 15px;
    animation: heroTextRise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.profile-page-subtitle {
    color: #A39385;
    font-size: 0.9rem;
    margin: 12px 0 30px;
}

.profile-summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #FDFDFD;
    border: 1px solid rgba(110, 95, 85, 0.08);
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(110, 95, 85, 0.06);
}

.profile-summary-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #D39F2D;
    flex-shrink: 0;
    background-color: #E8CE95;
}

.profile-summary-avatar-fallback {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #E8CE95;
    color: #A39385;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid #D39F2D;
}

.profile-summary-info h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    color: #6E5F55;
    margin-bottom: 2px;
}

.profile-summary-info p {
    font-size: 0.82rem;
    color: #A39385;
}

.profile-summary-note {
    margin-left: auto;
    font-size: 0.75rem;
    color: #A39385;
    text-align: right;
    max-width: 160px;
    line-height: 1.4;
}

/* Reaproveita a caixa de formulário do carrinho para manter o mesmo design */
.profile-form-box {
    background-color: #FDFDFD;
    padding: 28px;
    border-radius: 8px;
    border: 1px solid rgba(110, 95, 85, 0.08);
    margin-bottom: 20px;
}

.profile-form-box label {
    font-size: 1rem;
    font-weight: 600;
    color: #6E5F55;
    margin-bottom: 6px;
}

.profile-form-box input[type="text"],
.profile-form-box input[type="email"] {
    width: 100%;
    padding: 18px 18px;
    border-radius: 6px;
    border: 1px solid rgba(110, 95, 85, 0.2);
    font-size: 1.05rem;
    font-family: inherit;
    color: #6E5F55;
    background-color: #F8F2E3;
    min-height: 54px;
    transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-form-box input[type="text"]:hover,
.profile-form-box input[type="email"]:hover {
    border-color: rgba(197, 160, 89, 0.5);
}

.profile-form-box input[type="text"]:focus,
.profile-form-box input[type="email"]:focus {
    outline: none;
    border-color: #D39F2D;
    background-color: #FDFDFD;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.profile-form-box textarea {
    width: 100%;
    min-height: 130px;
    padding: 18px 18px;
    border-radius: 6px;
    border: 1px solid rgba(110, 95, 85, 0.2);
    font-size: 1.05rem;
    font-family: inherit;
    color: #6E5F55;
    background-color: #F8F2E3;
    resize: vertical;
    transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-form-box textarea:hover {
    border-color: rgba(197, 160, 89, 0.5);
}

.profile-form-box textarea:focus {
    outline: none;
    border-color: #D39F2D;
    background-color: #FDFDFD;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.profile-form-box input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.profile-form-box .form-group-full {
    margin-bottom: 26px;
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 6px;
}

.btn-profile-save {
    background-color: #6E5F55;
    color: #FDFDFD;
    border: none;
    padding: 13px 30px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-profile-save:hover {
    background-color: #D39F2D;
}

.btn-profile-save:active {
    transform: scale(0.97);
}

.btn-profile-cancel {
    background-color: transparent;
    color: #6E5F55;
    border: 1px solid rgba(110, 95, 85, 0.25);
    padding: 13px 24px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-profile-cancel:hover {
    border-color: #D39F2D;
    color: #A9781E;
}

.profile-alert {
    padding: 13px 18px;
    border-radius: 6px;
    font-size: 0.88rem;
    margin-bottom: 22px;
    border-left: 3px solid transparent;
}

.profile-alert.success {
    background-color: rgba(63, 138, 76, 0.1);
    color: #3f8a4c;
    border-left-color: #3f8a4c;
}

.profile-alert.error {
    background-color: rgba(217, 83, 79, 0.1);
    color: #D83232;
    border-left-color: #D83232;
}

@media (max-width: 600px) {
    .profile-summary-card {
        flex-wrap: wrap;
    }
    .profile-summary-note {
        margin-left: 0;
        text-align: left;
        max-width: none;
    }
    .profile-form-actions {
        flex-direction: column-reverse;
    }
    .btn-profile-save,
    .btn-profile-cancel {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ==========================================================================
   13.1 PÁGINA "MEU PERFIL" — Histórico de Pedidos
   ========================================================================== */
.orders-section {
    margin-top: 40px;
}

.orders-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    color: #6E5F55;
    margin-bottom: 4px;
}

.orders-section-subtitle {
    color: #A39385;
    font-size: 0.88rem;
    margin: 6px 0 22px;
}

/* --- Abas de filtro por status (Tudo / Preparando / A caminho / Finalizado / Cancelado) --- */
.orders-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.order-filter-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #6E5F55;
    background-color: #FDFDFD;
    border: 1px solid rgba(110, 95, 85, 0.18);
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.order-filter-btn:hover {
    border-color: rgba(197, 160, 89, 0.5);
    transform: translateY(-1px);
}

.order-filter-btn.is-active {
    background-color: #C5A059;
    border-color: #C5A059;
    color: #FFFFFF;
}

.orders-filter-empty {
    color: #A39385;
    font-size: 0.9rem;
    text-align: center;
    padding: 30px 10px;
}

/* --- Estado vazio --- */
.orders-empty-state {
    background-color: #FDFDFD;
    border: 1px dashed rgba(110, 95, 85, 0.25);
    border-radius: 10px;
    padding: 50px 30px;
    text-align: center;
    color: #A39385;
}

.orders-empty-icon {
    width: 44px;
    height: 44px;
    opacity: 0.35;
    margin-bottom: 14px;
}

.orders-empty-state p {
    font-size: 0.98rem;
    margin-bottom: 20px;
}

.orders-empty-state .btn-profile-save {
    display: inline-block;
    text-decoration: none;
}

/* --- Lista de pedidos (resumo) --- */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Card resumido e clicável: mostra só o essencial, o resto fica na subpágina */
.order-summary-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    background-color: #FDFDFD;
    border: 1px solid rgba(110, 95, 85, 0.08);
    border-radius: 10px;
    padding: 18px 22px;
    box-shadow: 0 4px 15px rgba(110, 95, 85, 0.06);
    cursor: pointer;
    transition: box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
    animation: cardFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.order-summary-card:hover,
.order-summary-card:focus-visible {
    box-shadow: 0 8px 25px rgba(110, 95, 85, 0.14);
    transform: translateY(-2px);
    border-color: rgba(197, 160, 89, 0.35);
}

.order-summary-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.order-summary-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.order-summary-items {
    font-size: 0.8rem;
    color: #A39385;
}

.order-summary-footer .order-total {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6E5F55;
}

.order-summary-arrow {
    margin-left: auto;
    font-size: 1.4rem;
    line-height: 1;
    color: #C5A059;
    transition: transform 0.2s ease;
}

.order-summary-card:hover .order-summary-arrow {
    transform: translateX(4px);
}

/* --- Subpágina de detalhe do pedido --- */
#ordersDetailView .order-detail-page {
    animation: cardFadeIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.btn-voltar-pedidos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #B08D57;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-voltar-pedidos:hover {
    color: #D39F2D;
    text-decoration: underline;
}

.order-card {
    background-color: #FDFDFD;
    border: 1px solid rgba(110, 95, 85, 0.08);
    border-radius: 10px;
    padding: 22px 24px;
    box-shadow: 0 4px 15px rgba(110, 95, 85, 0.06);
    transition: box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    animation: cardFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.order-card:hover {
    box-shadow: 0 8px 25px rgba(110, 95, 85, 0.14);
    transform: translateY(-2px);
}

.order-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(110, 95, 85, 0.1);
}

.order-card-header-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.order-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #6E5F55;
}

.order-date {
    font-size: 0.78rem;
    color: #A39385;
}

.order-status-badge {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.order-status-badge.status-pendente {
    background-color: rgba(211, 159, 45, 0.14);
    color: #A9781E;
}

.order-status-badge.status-pago {
    background-color: rgba(63, 138, 76, 0.12);
    color: #3f8a4c;
}

.order-status-badge.status-enviado {
    background-color: rgba(94, 133, 176, 0.14);
    color: #4b6f96;
}

.order-status-badge.status-entregue {
    background-color: rgba(63, 138, 76, 0.18);
    color: #2f6b3a;
}

.order-status-badge.status-cancelado {
    background-color: rgba(216, 50, 50, 0.1);
    color: #D83232;
}

/* --- Itens do pedido --- */
.order-card-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.order-item-link {
    display: block;
    flex-shrink: 0;
}

.order-item-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background-color: #F8F2E3;
}

.order-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.order-item-name {
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    color: #6E5F55;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s ease;
}

.order-item-name:hover {
    color: #B08D57;
    text-decoration: underline;
}

.order-item-qty {
    font-size: 0.78rem;
    color: #A39385;
}

.btn-cancelar-compra {
    flex-shrink: 0;
    margin-left: auto;
    padding: 7px 14px;
    font-size: 0.78rem;
    font-family: 'Poppins', sans-serif;
    color: #D83232;
    background-color: transparent;
    border: 1px solid #D83232;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.btn-cancelar-compra:hover {
    background-color: #D83232;
    color: #fff;
}

.btn-cancelar-compra:disabled,
.btn-cancelar-compra--andamento {
    color: #A39385;
    border-color: #A39385;
    background-color: transparent;
    cursor: default;
}

.btn-cancelar-compra:disabled:hover {
    background-color: transparent;
    color: #A39385;
}

@media (max-width: 480px) {
    .order-item {
        flex-wrap: wrap;
    }

    .btn-cancelar-compra {
        margin-left: 66px;
    }
}

/* --- Rodapé do card --- */
.order-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(110, 95, 85, 0.1);
}

.order-payment-method {
    font-size: 0.78rem;
    color: #A39385;
    background-color: #F8F2E3;
    padding: 5px 12px;
    border-radius: 20px;
}

.order-total {
    font-size: 0.95rem;
    color: #6E5F55;
}

.order-total strong {
    color: #D39F2D;
    font-size: 1.05rem;
}

@media (max-width: 600px) {
    .order-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .order-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .order-item-name {
        white-space: normal;
    }
}

/* ==========================================================================
   Feedback de produto (movido de <style> inline em produto.php)
   ========================================================================== */
.product-feedback-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.feedback-item {
    border-bottom: 1px solid #E8CE95;
    padding-bottom: 15px;
    margin-bottom: 15px;
    animation: cardFadeIn 0.4s ease forwards;
}

.feedback-stars {
    color: #D39F2D;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.feedback-form-box {
    background-color: #FDFDFD;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid rgba(110, 95, 85, 0.08);
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(110, 95, 85, 0.06);
}

.feedback-textarea {
    width: 100%;
    max-width: 600px;
    padding: 10px 12px;
    border: 1px solid rgba(110, 95, 85, 0.2);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #6E5F55;
    background-color: #F8F2E3;
    transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
    resize: vertical;
}

.feedback-textarea:hover {
    border-color: rgba(197, 160, 89, 0.5);
}

.feedback-textarea:focus {
    outline: none;
    border-color: #D39F2D;
    background-color: #FDFDFD;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.feedback-form-box h3 {
    font-family: 'Georgia', serif;
    font-size: 1.3rem;
    color: #6E5F55;
    margin-bottom: 20px;
    border-bottom: 1px dashed rgba(110, 95, 85, 0.15);
    padding-bottom: 8px;
}

.feedback-form-box label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6E5F55;
}

/* Avaliacao por estrelas */
.star-rating {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 6px;
}

.star-btn {
    background: none;
    border: none;
    padding: 0 2px;
    font-size: 2rem;
    line-height: 1;
    color: #E8CE95;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.star-btn:hover,
.star-btn.hovered {
    color: #D39F2D;
    transform: scale(1.15);
}

.star-btn.active {
    color: #D39F2D;
}

.star-btn:focus-visible {
    outline: 2px solid #D39F2D;
    outline-offset: 2px;
    border-radius: 4px;
}

.star-rating-label {
    display: block;
    font-size: 0.85rem;
    color: #A39385;
    margin-top: 2px;
}

.btn-whatsapp-flutuante {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25d366; /* Cor oficial do WhatsApp */
  color: #fff;
  border-radius: 50%;
  text-align: center;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Garante que fique acima de outros elementos */
  transition: transform 0.3s ease;
}

.btn-whatsapp-flutuante:hover {
  transform: scale(1.1); /* Efeito de zoom ao passar o mouse */
  background-color: #1ebe5d;
}

/* --- MENU LATERAL --- */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 22, 15, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 9997;
}

.menu-overlay.aberto {
    opacity: 1;
    visibility: visible;
}

.menu-lateral {
    position: fixed;
    z-index: 9999;
    height: 100vh;
    width: 280px;
    max-width: 82vw;
    top: 0;
    left: 0;
    background-color: #FDFDFD;
    border-right: 1px solid rgba(110, 95, 85, 0.12);
    box-shadow: 8px 0 30px rgba(110, 95, 85, 0.15);
    padding: 28px 0 30px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-lateral::-webkit-scrollbar {
    width: 6px;
}

.menu-lateral::-webkit-scrollbar-track {
    background: #6E5F55;
}

.menu-lateral::-webkit-scrollbar-thumb {
    background-color: #A39385;
    border-radius: 20px;
}

.menu-lateral::-webkit-scrollbar-thumb:hover {
    background-color: #6E5F55;
}

.menu-lateral {
    scrollbar-width: thin;
    scrollbar-color: #A39385 #6E5F55;
}

.menu-lateral.aberto {
    transform: translateX(0);
}

.menu-lateral-foto {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 30px 18px;
}

.menu-lateral-foto img {
    width: 92px;
    height: 92px;
    object-fit: contain;
    border-radius: 50%;
    background-color: #FBF3E4;
    border: 1px solid rgba(211, 159, 45, 0.25);
    padding: 14px;
}

.menu-lateral-titulo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #6E5F55;
    text-align: center;
    padding: 0 30px 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(110, 95, 85, 0.12);
}

.menu-lateral-titulo span {
    color: #D39F2D;
}

.menu-lateral a {
    padding: 14px 30px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: #6E5F55;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid transparent;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-lateral a:hover {
    color: #B9832A;
    background-color: rgba(211, 159, 45, 0.1);
    border-left-color: #D39F2D;
    padding-left: 36px;
}

.btn-abrir {
    position: static;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #FDFDFD;
    color: #6E5F55;
    padding: 14px 22px;
    border: 1px solid rgba(110, 95, 85, 0.18);
    border-radius: 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(110, 95, 85, 0.12);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-abrir svg {
    width: 20px;
    height: 20px;
}

.btn-abrir:hover {
    background-color: #D39F2D;
    border-color: #D39F2D;
    color: #FDFDFD;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.35);
}

.btn-fechar {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 26px;
    line-height: 1;
    background: none;
    border: none;
    color: #A39385;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-fechar:hover {
    color: #D39F2D;
}


/* ==========================================================================
   AJUSTES FINAIS — MENU, FORMULÁRIO E WHATSAPP
   ========================================================================== */

.nav-left {
    min-width: 0;
}

.btn-abrir {
    min-height: 46px;
    justify-content: center;
    white-space: nowrap;
    position: relative;
    z-index: 1001;
}

.cart-shipping-form-box select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    min-height: 42px;
    padding: 10px 38px 10px 12px;
    border-radius: 4px;
    border: 1px solid rgba(110, 95, 85, 0.2);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.25;
    color: #6E5F55;
    background-color: #F8F2E3;
    background-image: linear-gradient(45deg, transparent 50%, #A39385 50%),
                      linear-gradient(135deg, #A39385 50%, transparent 50%);
    background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-shipping-form-box select:hover {
    border-color: rgba(197, 160, 89, 0.5);
}

.cart-shipping-form-box select:focus {
    outline: none;
    border-color: #D39F2D;
    background-color: #FDFDFD;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.cart-shipping-form-box input,
.cart-shipping-form-box select {
    font-family: inherit;
}

.btn-whatsapp-flutuante {
    overflow: hidden;
}

.btn-whatsapp-flutuante img {
    display: block;
    width: 35px;
    height: 35px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 4%;
    }

    .nav-left {
        gap: 8px;
        flex-wrap: wrap;
    }

    .btn-abrir {
        padding: 11px 16px;
        font-size: 0.9rem;
    }

    .btn-back-catalog {
        font-size: 0.78rem;
    }

    .btn-whatsapp-flutuante {
        width: 56px;
        height: 56px;
        right: 16px;
        bottom: 16px;
    }

    .btn-whatsapp-flutuante img {
        width: 32px;
        height: 32px;
    }
}

/* ============================================================================
   CORREÇÃO GLOBAL DO CABEÇALHO / BOTÃO MENU
   Mantém o menu sempre dentro da mesma barra do logotipo em todas as páginas.
   ============================================================================ */
.navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    width: 100%;
    min-height: 106px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    grid-template-areas: "left logo right" !important;
    align-items: center !important;
    gap: 24px;
    padding: 8px 5% !important;
    overflow: visible;
}

.navbar .nav-left {
    grid-area: left !important;
    min-width: 0;
    width: 100%;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 14px;
    flex-wrap: nowrap !important;
}

.navbar .logo-container {
    grid-area: logo !important;
    min-width: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.navbar .main-logo-img {
    display: block;
    width: auto;
    height: 88px;
    max-width: min(330px, 100%);
    object-fit: contain;
}

.navbar .nav-right {
    grid-area: right !important;
    min-width: 0;
    width: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px;
}

/* O botão nunca fica solto acima/fora da navbar. */
.navbar .btn-abrir {
    position: static !important;
    inset: auto !important;
    z-index: auto;
    flex: 0 0 auto;
    min-height: 46px;
    margin: 0;
}

/* Link de retorno acompanha o botão sem quebrar a barra. */
.navbar .btn-back-catalog {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .navbar {
        min-height: 76px;
        grid-template-columns: minmax(130px, auto) minmax(0, 1fr) auto !important;
        grid-template-areas: "left logo right" !important;
        gap: 10px;
        padding: 7px 4% !important;
    }

    .navbar .nav-left {
        width: 100%;
        gap: 8px;
    }

    .navbar .nav-right {
        width: auto;
        gap: 8px;
    }

    .navbar .main-logo-img {
        height: 62px;
        max-width: 190px;
    }

    .navbar .btn-abrir {
        min-height: 42px;
        padding: 10px 14px;
        font-size: 0.88rem;
    }

    .navbar .btn-back-catalog {
        display: none;
    }
}

@media (max-width: 480px) {
    .navbar .main-logo-img {
        height: 54px;
        max-width: 165px;
    }

    .navbar .btn-abrir {
        padding: 9px 12px;
    }

    /* Telas muito pequenas: catálogo em coluna única para não espremer os cards */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-img-container {
        height: 220px;
    }

    .nav-search-wrapper .nav-search-input {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   9. CABEÇALHO / LOGO — RESPONSIVIDADE FLUIDA DO BANNER SUPERIOR
   Ajusta a barra com a logo para se adaptar suavemente a qualquer tela,
   sem saltos bruscos entre os breakpoints.
   ========================================================================== */
.navbar .main-logo-img {
    height: clamp(46px, 9vw, 88px);
    max-width: min(280px, 42vw);
    filter: drop-shadow(0 2px 6px rgba(110, 95, 85, 0.18));
}

@media (max-width: 480px) {
    /* Botão "Menu" vira apenas ícone para dar mais respiro à logo e à busca */
    .navbar .btn-abrir span {
        display: none;
    }

    .navbar .btn-abrir {
        padding: 0;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        justify-content: center;
    }

    .navbar .btn-abrir svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 360px) {
    .navbar {
        min-height: 64px;
        padding: 6px 3% !important;
        gap: 8px;
    }

    .navbar .main-logo-img {
        height: clamp(36px, 11vw, 48px);
        max-width: 38vw;
    }

    .nav-search-wrapper .nav-search-form {
        padding: 2px 2px 2px 10px;
    }
}

/* ==========================================================================
   10. BANNER HERO (IMAGEM PRINCIPAL DA HOME) — RESPONSIVIDADE FLUIDA
   A altura e as fontes acompanham a largura da tela em vez de valores fixos,
   evitando que o banner fique gigante no mobile ou o texto vaze da imagem.
   ========================================================================== */
.hero-section {
    height: clamp(220px, 46vw, 450px);
}

.hero-overlay {
    left: 6%;
    right: 6%;
    bottom: clamp(16px, 5vw, 40px);
}

.hero-overlay h2 {
    font-size: clamp(1.35rem, 5vw, 2.5rem);
    line-height: 1.15;
}

.hero-overlay p {
    font-size: clamp(0.85rem, 2.2vw, 1.1rem);
    max-width: min(500px, 92%);
}

.hero-badge {
    font-size: clamp(0.62rem, 1.8vw, 0.75rem);
    padding: 4px 12px;
    margin-bottom: clamp(8px, 2vw, 14px);
}

@media (max-width: 600px) {
    .hero-section {
        height: clamp(200px, 58vw, 320px);
    }

    .hero-overlay p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    /* Um pouco mais de escurecimento na base para o texto continuar legível
       mesmo com o banner mais baixo */
    .hero-section::after {
        background: linear-gradient(0deg, rgba(30, 22, 15, 0.85) 0%, rgba(30, 22, 15, 0.2) 60%, rgba(30, 22, 15, 0.3) 100%);
    }
}

/* ==========================================================================
   Utilitários e classes migradas de estilos inline (style="...") dos
   arquivos PHP/HTML para manter todo o CSS centralizado neste arquivo.
   ========================================================================== */

/* Utilitários genéricos de texto/layout */
.text-center { text-align: center; }
.text-muted { color: #A39385; }
.text-muted-small { color: #A39385; font-size: 0.85rem; }
.text-muted-loading { color: #A39385; font-size: 0.9rem; }
.text-brown { color: #6E5F55; }
.text-error { color: #D83232; }
.form-inline { display: inline; }
.hidden { display: none !important; }

/* Mensagens de erro vindas da API (antes montadas com style inline em die()) */
.api-error-box {
    text-align: center;
    padding: 50px;
    color: #D83232;
}

/* Mensagens de "nenhum resultado" no catálogo / linha Nouren */
.no-results-message {
    text-align: center;
}

.no-results-message.full-row {
    grid-column: 1 / -1;
}

/* Carrinho vazio */
.empty-cart-message {
    text-align: center;
    padding: 40px;
    color: #6E5F55;
}

/* Item do carrinho fora de estoque (antes opacity/background inline) */
.cart-item-card.out-of-stock {
    opacity: 0.6;
    background-color: #E8CE95;
}

.cart-item-name-link {
    color: inherit;
    text-decoration: none;
}

.out-of-stock-label {
    color: #D83232;
    font-size: 0.8rem;
}

.btn-qty:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-finish-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Campo de formulário com erro de validação (antes input.style.borderColor via JS) */
.cart-shipping-form-box input.input-error {
    border-color: #D83232 !important;
}

/* Breadcrumb da página de produto */
.breadcrumb-current {
    color: #D39F2D;
    font-weight: 500;
}

/* Bloco de nota média de avaliação no topo do produto */
#mediaAvaliacao {
    color: #D39F2D;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.media-score {
    color: #6E5F55;
    font-weight: bold;
    margin-left: 5px;
}

.media-count {
    color: #A39385;
    font-size: 0.9rem;
    margin-left: 5px;
}

/* Bloco de composição/insumos do produto */
.product-composition-block {
    margin-top: 25px;
    margin-bottom: 20px;
}

.product-composition-title {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    color: #6E5F55;
    margin-bottom: 8px;
}

/* Código de referência (SKU) do produto */
.product-ref-code {
    font-size: 0.85rem;
    color: #A39385;
    margin-top: -8px;
    margin-bottom: 12px;
    font-family: monospace;
}

/* Divisor acima da seção de avaliações */
.feedback-divider {
    border: 0;
    border-top: 1px solid #E8CE95;
    margin-bottom: 30px;
}

/* Campos do formulário de avaliação */
.form-field-block {
    margin-bottom: 15px;
}

.form-field-label {
    display: block;
    margin-bottom: 8px;
}

.form-field-label-sm {
    display: block;
    margin-bottom: 5px;
}

.btn-auto-width {
    width: auto;
    padding: 10px 25px;
}

/* Texto de cada avaliação renderizada via JS */
.feedback-text {
    margin: 8px 0;
    color: #6E5F55;
    line-height: 1.5;
}

.feedback-date {
    color: #A39385;
}

/* Botão "Ver mais avaliações" criado dinamicamente via JS */
.btn-ver-mais {
    display: block;
    margin: 20px auto;
    width: auto;
    background-color: transparent;
    color: #6E5F55;
    border: 1px solid #6E5F55;
    padding: 8px 20px;
}

/* Feedback visual de "Adicionado ao carrinho" (antes botao.style.backgroundColor via JS) */
.btn-add-cart.btn-add-cart-success {
    background-color: #3f8a4c;
}

/* Trava o scroll do body quando o menu lateral está aberto (antes body.style.overflow via JS) */
body.menu-open {
    overflow: hidden;
}
