@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800&family=Inter:wght@400;700&display=swap');

:root {
    --primary-color: #3b2818;
    --secondary-color: #f7f7f7;
    --button-green: #67a252;
    --button-green-hover: #588f44;
    --text-dark: #333;
    --text-light: #777;
    --border-color: #eee;
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
}

/* Header */
.top-header {
    background-color: #2e2622;
    color: white;
    display: flex;
    align-items: center;
    padding: 10px 50px;
    z-index: 1000;
    justify-content: space-between;
    gap: 30px;
    min-height: 100px;
    isolation: isolate; /* Fix crucial para transparência no Safari/iPhone */
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1100;
}

.logo img {
    height: 120px;
    display: block;
    filter: brightness(1.1); /* Apenas um leve brilho realçado */
}

.search-bar {
    flex-grow: 1; /* Busca ocupa o espaço central */
    max-width: 450px;
    min-width: 150px;
}

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

.user-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 13px;
    font-weight: bold;
    margin-left: auto;
    justify-content: flex-end;
}

.btn-header {
    background: #dac594;
    color: #2e2622;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-header:hover {
    background: #c5ae78;
}

.nav-menu {
    background-color: #1a1614;
    color: #ccc;
    padding: 12px 50px;
    display: flex;
    gap: 25px;
    font-size: 14px;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 20px 50px;
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
}

.breadcrumbs span {
    margin: 0 5px;
}

/* Product Page */
.product-container {
    display: flex;
    padding: 0 50px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-image {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 80%;
    height: auto;
}

.product-info {
    flex: 1;
}

.product-info h1 {
    font-family: 'Georgia', serif;
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.sku {
    color: var(--text-light);
    font-size: 13px;
    display: block;
    margin-bottom: 20px;
}

.short-desc {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #444;
}

.short-desc b,
.short-desc strong {
    color: var(--primary-color);
}

.see-more {
    color: #5a8bb4;
    font-size: 12px;
    text-decoration: none;
    font-weight: bold;
}

.price-section {
    margin-top: 25px;
    border-top: 1px dashed #ccc;
    padding-top: 20px;
}

.old-price {
    color: var(--text-light);
    text-decoration: line-through;
    font-size: 16px;
    margin-bottom: 5px;
}

.current-price {
    font-size: 36px;
    font-weight: bold;
    color: var(--text-dark);
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.current-price span {
    font-size: 14px;
    font-weight: normal;
    color: var(--text-light);
}

.buy-action {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    user-select: none;
}

.quantity button {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 50%; /* Circular buttons for a sophisticated feel */
    width: 44px;
    height: 44px;
    font-size: 14px;
    cursor: pointer;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0,0,0,0.06);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .quantity button:hover {
        background: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
        transform: scale(1.1);
        box-shadow: 0 8px 15px rgba(59, 40, 24, 0.2);
    }
}

.quantity button:active {
    transform: scale(0.9);
    background: #eee;
}

.quantity span {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.btn-comprar {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
    background-color: var(--button-green);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    flex-grow: 1;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-comprar:hover {
    background-color: var(--button-green-hover);
    transform: scale(1.02);
}

/* Long Description */
.long-desc {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 50px;
    line-height: 1.6;
    color: #444;
    font-size: 14px;
}

.long-desc h3 {
    color: var(--text-dark);
    margin-top: 30px;
    font-size: 16px;
}

.long-desc ul {
    padding-left: 20px;
}

.long-desc ul li {
    margin-bottom: 5px;
}

/* Checkout Page */
.checkout-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.checkout-container h2 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.full-width {
    grid-column: span 2;
}

.form-group {
    margin-bottom: 5px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 13px;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.btn-submit {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
    background-color: var(--button-green);
    color: white;
    border: none;
    width: 100%;
    padding: 20px;
    font-size: 20px;
    font-weight: 800;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 30px;
    transition: transform 0.2s, background 0.2s;
}

.btn-submit:hover {
    background-color: var(--button-green-hover);
    transform: scale(1.02);
}

.api-error-box {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 16px;
    border-radius: 6px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    animation: slideIn 0.3s ease-out;
}

.api-error-box i {
    font-size: 18px;
    color: #dc2626;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.payment-box {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Footer */
.site-footer {
    background-color: #2e2622;
    color: #ccc;
    padding: 50px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    font-size: 14px;
    margin-top: 60px;
}

.site-footer h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: bold;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.site-footer ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer ul li a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.social-icons a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.social-icons a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal PIX e UX Checkout transformado em Painel Lateral (Sidebar) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 100;
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: block;
    opacity: 1;
}

.pix-modal {
    background: white;
    padding: 40px 30px;
    width: 400px;
    height: 100vh;
    position: fixed;
    top: 0;
    right: -420px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
    overflow-y: auto;
    z-index: 101;
}

.pix-modal.active {
    right: 0;
}

.pix-modal h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

.pix-modal img#qr-code {
    width: 250px;
    height: 250px;
    margin: 0 auto 20px auto;
    display: block;
    background: #eee;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
}

.pix-modal .copia-cola-box {
    background: #f4f4f4;
    border: 1px dashed #ccc;
    padding: 15px;
    border-radius: 6px;
    word-break: break-all;
    font-family: monospace;
    font-size: 13px;
    color: #555;
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

.btn-copy {
    background: #3b2818;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: #2e2622;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.status-loader {
    margin-top: 25px;
    font-weight: bold;
    color: #e67e22;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff8e1;
    border: 1px solid #ffe0b2;
    padding: 15px;
    border-radius: 8px;
}

/* Estilos de Validação de Formulário Rígida */
.input-error {
    border-color: #e74c3c !important;
    background-color: #fff9f9 !important;
}

.error-message {
    color: #e74c3c;
    font-size: 11px;
    margin-top: 5px;
    display: none;
    text-align: left;
    font-weight: 600;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

/* Ajuste para acomodar a msg de erro sem quebrar layout */

/* Resumo do Pedido (Checkout Sidebar) */
.order-summary {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 25px;
    border: 1px solid #eaeaea;
}

.order-summary h3 {
    margin-bottom: 15px;
    color: #3b2818;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
}

.summary-details {
    flex: 1;
    text-align: left;
}

.summary-details h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
}

.summary-details p {
    margin: 0;
    font-size: 13px;
    color: #777;
}

/* Wizard Stepper */
.checkout-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    position: relative;
    padding: 0 30px;
}

.checkout-stepper::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.step {
    text-align: center;
    position: relative;
    z-index: 2;
    width: 80px;
    background: #fff;
}

.step-circle {
    width: 50px;
    height: 50px;
    background: #fff;
    border: 3px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px auto;
    color: #ccc;
    font-size: 20px;
    transition: all 0.3s;
}

.step.active .step-circle {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.step.completed .step-circle {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.step span {
    font-size: 13px;
    font-weight: bold;
    color: #aaa;
    transition: color 0.3s;
}

.step.active span,
.step.completed span {
    color: var(--primary-color);
}

.step-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.step-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Shipping List */
.shipping-options {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.shipping-option {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    background: #fdfdfd;
}

.shipping-option:last-child {
    border-bottom: none;
}

.shipping-option:hover {
    background: #f0f0f0;
}

.shipping-option input[type="radio"] {
    margin-right: 15px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.shipping-option label {
    cursor: pointer;
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.frete-name {
    color: #555;
}

.frete-price {
    font-weight: bold;
    color: #222;
}

.btn-next-step {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    float: right;
    margin-top: 15px;
    transition: background 0.2s;
}

.btn-next-step:hover {
    background-color: #211c19;
}

.btn-back-step {
    font-family: 'Inter', sans-serif;
    background-color: transparent;
    color: #777;
    border: none;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    float: left;
    margin-top: 15px;
    text-decoration: underline;
}

.btn-back-step:hover {
    color: #333;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* Responsividade Mobile - Smartphone */
@media (max-width: 768px) {
    .checkout-stepper::before {
        top: 20px;
        left: 30px;
        right: 30px;
    }

    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .step span {
        font-size: 11px;
    }

    .shipping-option label {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .shipping-option label span.frete-price {
        align-self: flex-start;
    }

    .top-header {
        flex-direction: column;
        align-items: center;
        padding: 20px 15px;
        gap: 15px;
        background-color: #2e2622;
        min-height: auto;
    }

    .logo {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .logo img {
        height: 140px;
        max-width: 95vw;
        object-fit: contain;
        display: block;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        gap: 10px;
        flex-wrap: wrap;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        text-align: center;
    }

    .product-container {
        flex-direction: column;
        padding: 0 20px;
        margin: 20px auto;
        gap: 30px;
    }

    .product-image {
        padding: 0;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .product-image img {
        max-width: 100%;
        height: auto;
    }

    .buy-action {
        flex-direction: column;
        gap: 15px;
    }

    .quantity {
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    .checkout-container {
        margin: 20px;
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .full-width {
        grid-column: span 1;
    }

    .site-footer {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        padding: 40px 20px;
    }

    .social-icons {
        justify-content: center;
    }
}