/* ==========================================================================
   1. VARIÁVEIS GLOBAIS E CONFIGURAÇÕES BASE
   ========================================================================== */
:root {
    --dark-navy: #182333;
    --hero-blue: #233247;
    --gold-yellow: #ffbd59;
    --gold-hover: #e0a348;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
}


/* ==========================================================================
   2. CABEÇALHO / BARRA SUPERIOR
   ========================================================================== */
.top-bar-wrapper {
    background-color: var(--dark-navy);
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
}

.top-bar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.brand-logo {
    color: #ffbd59 !important;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 4px;
}

.nav-btn {
    background-color: var(--gold-yellow);
    color: #182333;
    border: none;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-btn i {
    font-size: 0.8rem;
}

.nav-btn:hover {
    background-color: var(--gold-hover);
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .top-bar-wrapper {
        padding: 14px 24px;
    }

    .brand-logo {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 8px;
    }

    .nav-btn {
        font-size: 0.85rem;
        padding: 7px 12px;
        gap: 6px;
        border-radius: 6px;
    }

    .nav-btn i {
        font-size: 1rem;
    }
}


/* ==========================================================================
   3. SECÇÃO HERO (DESTAQUE E PESQUISA)
   ========================================================================== */
.hero-section {
    background-color: var(--hero-blue);
    color: #ffffff;
    padding: 25px 16px 35px;
    width: 100%;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.hero-center-content {
    text-align: center;
    max-width: 700px;
    width: 100%;
}

.hero-title {
    color: var(--gold-yellow);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.hero-subtitle {
    color: #cbd5e1;
    font-size: 0.85rem;
    margin-bottom: 18px;
}

@media (min-width: 700px) {
    .hero-section {
        padding: 35px 24px 45px;
    }

    .hero-body {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

.search-box {
    position: relative;
    max-width: 550px;
    width: 100%;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border-radius: 6px;
    border: none;
    outline: none;
    font-size: 0.9rem;
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1rem;
}

.delivery-badge {
    position: relative;
    margin: 5px auto 0;
    width: 100%;
    max-width: 320px;
    background-color: #ffffff;
    color: #0f172a;
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    line-height: 1.25;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 992px) {
    .delivery-badge {
        position: absolute;
        right: 0;
        bottom: -10px;
        margin: 0;
        width: auto;
        max-width: none;
    }
}

.delivery-badge i {
    font-size: 1.2rem;
    color: var(--dark-navy);
}


/* ==========================================================================
   4. CONTEÚDO PRINCIPAL E CATEGORIAS
   ========================================================================== */
.main-container {
    max-width: 1200px;
    margin: 25px auto;
    padding: 0 16px;
    width: 100%;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 14px;
}

@media (min-width: 768px) {
    .main-container {
        margin: 35px auto;
        padding: 0 20px;
    }

    .section-title {
        font-size: 1.35rem;
    }
}

.categories-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.category-btn {
    background-color: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn:hover {
    background-color: #f1f5f9;
}

.category-btn.active {
    background-color: var(--gold-yellow) !important;
    color: #000000 !important;
    border-color: var(--gold-yellow) !important;
}

.subcategories-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.subcategory-btn {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.subcategory-btn.active {
    background-color: var(--dark-navy) !important;
    color: #ffffff !important;
    border-color: var(--dark-navy) !important;
}


/* ==========================================================================
   5. GRID E CARTÕES DE PRODUTOS
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (min-width: 1000px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    cursor: pointer;
}

.product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

@media (min-width: 480px) {
    .product-card img {
        height: 150px;
    }

    .product-card {
        padding: 12px;
    }
}

.product-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    min-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 480px) {
    .product-card h3 {
        font-size: 0.9rem;
    }
}

.product-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold-yellow);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.product-card .add-to-cart-btn {
    width: 100%;
    height: 40px;
    background-color: var(--gold-yellow) !important;
    color: #0f172a !important;
    border: none !important;
    padding: 0 8px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.product-card .add-to-cart-btn:hover {
    background-color: var(--gold-hover) !important;
    transform: translateY(-1px);
}


/* ==========================================================================
   6. MODAIS E FORMULÁRIOS
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    width: 100% !important;
    max-width: 700px !important;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.cart-modal-content {
    max-width: 500px !important;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #64748b;
    z-index: 10;
}

.modal-content h2 {
    font-size: 1.2rem;
    color: var(--dark-navy);
    margin-bottom: 15px;
}

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

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #334155;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--dark-navy);
}

.modal-btn-submit {
    background-color: #ffbd59 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    border: none !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    width: 100%;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-btn-submit:hover {
    background-color: #e0a348 !important;
    transform: translateY(-1px);
}

.modal-footer-text {
    font-size: 0.82rem;
    text-align: center;
    margin-top: 12px;
    color: #64748b;
}

.modal-footer-text a {
    color: var(--dark-navy);
    font-weight: 700;
    text-decoration: none;
}


/* ==========================================================================
   7. DETALHES DO PRODUTO (MODAL INTERNO)
   ========================================================================== */
.product-details-modal {
    max-width: 750px;
    width: 100%;
}

.product-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 10px;
}

@media (min-width: 700px) {
    .product-details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.main-image-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
}

@media (min-width: 700px) {
    .main-image-container {
        height: 300px;
    }
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.thumbnails-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.thumbnail-img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.thumbnail-img:hover,
.thumbnail-img.active {
    border-color: var(--gold-yellow);
}

.product-info-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info-title {
    font-size: 1.2rem;
    color: var(--dark-navy);
    font-weight: 700;
    margin-bottom: 6px;
}

.product-info-price,
#detail-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold-yellow);
    margin-bottom: 12px;
    display: inline-block;
    letter-spacing: 0.3px;
}

.product-info-description {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 15px;
}

#detail-add-cart-btn,
.product-info-column .modal-btn-submit,
#product-modal button.modal-btn-submit {
    width: 100%;
    height: 44px;
    background-color: var(--gold-yellow, #ffbd59) !important;
    color: #0f172a !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease, transform 0.1s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

#detail-add-cart-btn:hover,
.product-info-column .modal-btn-submit:hover,
#product-modal button.modal-btn-submit:hover {
    background-color: var(--gold-hover, #e0a348) !important;
    transform: translateY(-1px);
}


/* ==========================================================================
   8. CARRINHO DE COMPRAS E CHECKOUT
   ========================================================================== */
.cart-items-container {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin-bottom: 12px;
    padding-top: 8px;
    border-top: 2px solid #f1f5f9;
}

.cart-total-row strong {
    color: var(--gold-yellow);
    font-weight: 700;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.cart-item-info h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #1e293b;
}

.cart-item-info p {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

/* AÇÕES DO CARRINHO (NOVOS ESTILOS ADICIONADOS) */
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.qty-btn:hover {
    background-color: #e2e8f0;
}

.remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 6px;
    transition: color 0.2s ease;
}

.remove-btn:hover {
    color: #b91c1c;
}

.paysuite-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.payment-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
    gap: 10px;
    margin-top: 6px;
}

.payment-option-btn {
    border: 2px solid #e2e8f0;
    padding: 10px 8px;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 0.82rem;
    color: #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease-in-out;
}

.payment-option-btn i {
    font-size: 1.3rem;
}

.payment-option-btn.selected {
    border-color: #ffbd59;
    background: #fffbeb;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(255, 189, 89, 0.25);
}

.checkout-total-container {
    margin: 15px 0 12px 0;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.checkout-total-price {
    color: var(--gold-yellow);
    font-size: 1.2rem;
    font-weight: 800;
}


/* ==========================================================================
   9. RECIBOS E COMPROVATIVOS
   ========================================================================== */
.recibos-modal-content {
    max-width: 550px !important;
}

.recibos-list-container {
    max-height: 55vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recibo-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    background-color: #f8fafc;
    position: relative;
}

.recibo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #cbd5e1;
}

.recibo-card-id {
    font-weight: 700;
    color: var(--dark-navy);
    font-size: 0.9rem;
}

.recibo-card-date {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.status-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
}

.status-pago {
    background-color: #dcfce7;
    color: #166534;
}

.status-nao-pago {
    background-color: #fee2e2;
    color: #991b1b;
}


/* ==========================================================================
   10. BOTÕES FLUTUANTES, TOASTS E ELEMENTOS AUXILIARES
   ========================================================================== */
.floating-cart-btn {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--gold-yellow);
    color: #0f172a;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 900;
    transition: all 0.2s ease-in-out;
}

.floating-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #e11d48;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #ffffff;
}

.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #0f172a;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    border-left: 4px solid #22c55e;
    font-size: 0.9rem;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-notification i {
    color: #22c55e;
    font-size: 1.1rem;
}

.birthdate-group {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 6px;
}

.birthdate-group select {
    width: 100%;
    padding: 9px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.8rem;
    outline: none;
    background-color: #ffffff;
    color: #1e293b;
}

.back-categories-btn {
    background-color: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: inline-block;
    transition: background-color 0.2s ease;
}


/* ==========================================================================
   11. RODAPÉ
   ========================================================================== */
footer {
    background-color: var(--dark-navy);
    color: #ffffff;
    padding: 30px 16px;
    margin-top: 40px;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 10px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 900px) {
    .footer-columns {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-brand h3 {
    color: var(--gold-yellow);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.78rem;
}

.footer-nav span,
.footer-contact span {
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffffff;
    display: block;
    margin-bottom: 6px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.78rem;
    line-height: 1.6;
    display: block;
}

.footer-links a:hover {
    color: var(--gold-yellow);
}

.support-label {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 2px;
}

.phone-link {
    color: var(--gold-yellow);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}