:root {
    --primary: #fd7e14; /* Laranja Ortobom */
    --secondary: #1e3a8a; /* Azul Escuro Ortobom */
    --dark: #0f172a; /* Rodapé / Fundo */
    --light: #f1f5f9;
    --white: #ffffff;
    --success: #16a34a; /* Verde Economize */
    --gray: #64748b;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

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

body { background-color: #f8fafc; color: var(--dark); overflow-x: hidden; }

/* Wrapper global de largura máxima para header e footer */
.max-width-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

/* Header Premium */
header {
    background: var(--secondary);
    color: white;
    padding: 0 5%;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.search-bar {
    flex: 0 1 500px;
    position: relative;
    margin: 0 1rem;
}

.search-bar input {
    width: 100%;
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    outline: none;
}

.header-icons { display: flex; gap: 20px; font-size: 1.2rem; }

/* Menu Categorias */
.nav-menu {
    background: white;
    box-shadow: var(--shadow);
    padding: 0 5%;
}

.nav-wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 10px 0;
    max-width: 1300px;
    margin: 0 auto;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Vitrine Style Ortobom */
.container { padding: 4rem 5%; max-width: 1300px; margin: 0 auto; }

.vitrine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

.card-tag-off {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.75rem;
    z-index: 10;
}

/* Coração de Favoritos */
.btn-fav-card {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--secondary);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
    transition: var(--transition);
}

.btn-fav-card:hover { transform: scale(1.1); }

@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.heart-active i { color: #ef4444; }
.heart-pulse { animation: heartbeat 0.8s ease-in-out; }

/* Efeito de partículas (corações voadores) */
.floating-heart {
    position: absolute;
    color: #ef4444;
    font-size: 14px;
    pointer-events: none;
    animation: floatUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 20;
}

@keyframes floatUp {
    0% { transform: translate(0, 0) scale(0.5); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(1.5); opacity: 0; }
}

.card-img { height: 260px; object-fit: cover; width: 100%; }

.card-content { padding: 1.5rem; flex-grow: 1; text-align: left; }

.card-category { color: var(--gray); font-size: 0.8rem; margin-bottom: 5px; }

.card-title { font-size: 1.1rem; font-weight: 700; height: 3rem; overflow: hidden; margin-bottom: 1rem; }

.price-old { text-decoration: line-through; color: var(--gray); font-size: 0.9rem; }

.badge-save {
    background: #dcfce7;
    color: var(--success);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 10px;
}

.price-main { font-size: 1.6rem; font-weight: 800; color: var(--secondary); margin-bottom: 5px; }

.price-installments { font-size: 0.85rem; color: var(--gray); margin-bottom: 1.5rem; }

/* Botão Comprar Estilo Ortobom */
.btn-buy {
    background: var(--secondary);
    color: white;
    text-decoration: none;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    transition: var(--transition);
}

.btn-buy:hover { background: #1e40af; }

/* Footer Robusto */
footer {
    background: var(--dark);
    color: white;
    padding: 5rem 5% 2rem;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-transform: uppercase;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #94a3b8; text-decoration: none; font-size: 0.9rem; transition: var(--transition); }
.footer-col ul li a:hover { color: white; }

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
}

    /* Media queries movidas para o final do arquivo */

/* ==== PÁGINA DE PRODUTO (produto.php) ==== */
.breadcrumb { font-size: 0.85rem; color: var(--gray); margin-bottom: 1rem; }
.breadcrumb a { color: var(--secondary); text-decoration: none; }

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Galeria */
.gallery-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #f8fafc;
}

.gallery-main img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    display: block;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}
.gallery-nav-btn:hover { opacity: 1; }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumb-item {
    width: 70px;
    height: 70px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    object-fit: cover;
}
.thumb-item.active { border-color: var(--secondary); }

/* Informações do Produto */
.product-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.product-info-title { font-size: 1.8rem; font-weight: 800; color: var(--dark); }
.product-info-actions { display: flex; gap: 15px; font-size: 1.3rem; color: var(--secondary); }
.product-info-actions i { cursor: pointer; }

.product-desc-short { color: var(--gray); font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.5; }
.link-readmore { color: var(--secondary); text-decoration: none; font-weight: 600; }

/* Seletor de Tamanhos */
.size-section { margin-bottom: 2rem; border-top: 1px solid #e2e8f0; padding-top: 1.5rem; }
.size-header { display: flex; justify-content: space-between; margin-bottom: 1rem; font-weight: 600; }
.size-header span { color: var(--dark); }
.size-header a { color: var(--secondary); text-decoration: none; font-size: 0.9rem; }

.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.size-card {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.size-card:hover { border-color: #cbd5e1; }
.size-card.active {
    border-color: var(--secondary);
    background-color: #f0fdf4; /* Um leve tom de verde ou azul claro */
}
.size-card.active .size-name { color: var(--secondary); font-weight: 700; }

.size-name { display: block; font-weight: 600; margin-bottom: 3px; font-size: 0.95rem; }
.size-dim { display: block; font-size: 0.75rem; color: var(--gray); margin-bottom: 5px; }
.size-price { display: block; font-weight: 700; color: var(--dark); font-size: 0.9rem; }

/* Preço e Compra */
.price-area {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.buy-row {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    height: 48px;
}

.qty-btn {
    background: white;
    border: none;
    width: 40px;
    height: 100%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--secondary);
    font-weight: bold;
}
.qty-btn:hover { background: #f1f5f9; }
.qty-input {
    width: 50px;
    height: 100%;
    border: none;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}

.btn-add-cart {
    flex-grow: 1;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    height: 48px;
}
.btn-add-cart:hover { background: #1e40af; }

/* CEP Calculator */
.cep-box {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    padding: 5px;
    align-items: center;
}
.cep-box input {
    border: none;
    padding: 10px;
    flex-grow: 1;
    outline: none;
}
.cep-box button {
    background: transparent;
    border: none;
    color: var(--gray);
    font-weight: 600;
    padding: 0 15px;
    cursor: pointer;
}

/* Descrição Longa */
.product-details-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    width: 100%;
}
.product-details-content h2 { margin-bottom: 1.5rem; color: var(--secondary); }
.product-details-content p { color: var(--gray); line-height: 1.8; margin-bottom: 1rem; text-align: justify; }

/* ==== PÁGINA DE CHECKOUT (checkout.php) ==== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.checkout-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.checkout-section h3 {
    margin-bottom: 1.5rem;
    color: var(--secondary);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Formulários */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.form-grid.full { grid-template-columns: 1fr; }

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    width: 100%;
    background: #f8fafc;
}
.form-control:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(253, 126, 20, 0.1);
}

/* Radio Buttons para tipo de pessoa */
.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}
.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Resumo do Pedido */
.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.95rem;
}
.summary-item.total {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--secondary);
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
    margin-top: 15px;
}

.checkout-product {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.checkout-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}
.checkout-product-info h4 { font-size: 0.95rem; color: var(--dark); margin-bottom: 5px; }
.checkout-product-info p { font-size: 0.8rem; color: var(--gray); }

.btn-checkout {
    background: var(--success);
    color: white;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    margin-top: 20px;
}
.btn-checkout:hover { background: #15803d; }

/* ==== RESPONSIVIDADE MOBILE ==== */
@media (max-width: 992px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }
    
    .search-bar { width: 100%; flex: 1 1 100%; margin: 0; }
    
    .nav-wrapper {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .nav-wrapper::-webkit-scrollbar { display: none; }
    
    .container { padding: 2rem 5%; }
    
    .vitrine-grid { grid-template-columns: 1fr; }
    
    footer { padding: 3rem 5% 2rem; margin-top: 3rem; }
    .footer-grid { gap: 2rem; }
    
    /* Responsividade Produto e Checkout */
    .product-grid, .checkout-grid { grid-template-columns: 1fr; gap: 2rem; padding: 1.5rem; }
    .gallery-main img { height: 350px; }
    
    /* Ajustes extras para checkout e forms no mobile */
    .form-grid { grid-template-columns: 1fr; }
    .checkout-summary .checkout-section { position: relative; top: 0; margin-top: 2rem; }
}

