/* =========================
   🎨 VARIÁVEIS
========================= */
:root {
    --rosa: #f8c8dc;
    --creme: #fff1e6;
    --chocolate: #6d4c41;
    --mel: #f4c95d;
    --lavanda: #cdb4db;
    --primary: #198754;
    --primary-dark: #157347;
    --primary-soft: #eaf7f0;
    --danger: #dc3545;
    --warning: #ffc107;
    --dark: #212529;
    --muted: #6c757d;
    --border: #e9ecef;
    --bg: #f6f7f8;
    --card: #ffffff;
    --shadow-sm: 0 8px 22px rgba(33, 37, 41, 0.06);
    --shadow-md: 0 16px 34px rgba(33, 37, 41, 0.10);
    --radius: 18px;
}

/* =========================
   🧾 BASE
========================= */
html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
}

.text-muted {
    color: var(--muted) !important;
}

h1, h2, h3, h4, h5 {
    color: var(--dark);
}

.page-content {
    padding-bottom: 42px;
}

/* =========================
   🧭 NAVBAR
========================= */
.app-navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(33, 37, 41, 0.05);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    color: var(--primary) !important;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
}

.brand-text {
    line-height: 1;
}

/* =========================
   CARRINHO
========================= */

.cart-list {
    display: grid;
    gap: 12px;
}

.cart-item-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.cart-product-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark);
}

.cart-product-subtitle {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 2px;
}

.cart-qty-group {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.cart-qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-top: none;
    border-bottom: none;
}

.cart-qty-value {
    min-width: 38px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.cart-item-total span {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
}

.cart-item-total strong {
    font-size: 0.95rem;
    color: var(--primary);
}

.cart-remove-btn {
    width: 100%;
    border-radius: 10px;
    font-weight: 600;
}

/* Desktop */
@media (min-width: 768px) {
    .cart-remove-btn {
        width: auto;
    }
}

/* Mobile compacto */
@media (max-width: 575.98px) {

    .cart-list {
        gap: 9px;
    }

    .cart-item-card {
        padding: 10px;
        border-radius: 12px;
    }

    .cart-product-name {
        font-size: 0.92rem;
        line-height: 1.25;
    }

    .cart-product-subtitle {
        font-size: 0.76rem;
    }

    .cart-qty-btn {
        width: 32px;
        height: 32px;
        padding: 0;
    }

    .cart-qty-value {
        min-width: 32px;
        font-size: 0.88rem;
    }

    .cart-item-total strong {
        font-size: 0.9rem;
    }

    .cart-remove-btn {
        min-height: 34px;
        font-size: 0.82rem;
        padding: 6px 10px;
    }
}

.store-footer {
    padding: 18px 0 26px;
}

/* =========================
   🏪 HERO
========================= */
.hero-store {
    background: radial-gradient(circle at top left, rgba(25, 135, 84, 0.12), transparent 34%), linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
    padding: 52px 0 36px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.store-logo {
    width: 116px;
    height: 116px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: var(--shadow-md);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .store-logo:hover {
        transform: translateY(-2px) scale(1.03);
        box-shadow: 0 20px 40px rgba(33, 37, 41, 0.14);
    }

.store-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.3rem);
    font-weight: 850;
    letter-spacing: -0.04em;
}

.store-description {
    max-width: 680px;
    margin: 10px auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.12rem);
}

/* =========================
   🔎 BUSCA E CATEGORIAS
========================= */
.store-toolbar {
    position: relative;
    z-index: 2;
    margin-top: -26px;
    padding-bottom: 22px;
}

.search-box {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

    .search-box .input-group-text {
        border: 0;
        background: #fff;
        color: var(--muted);
        padding-left: 18px;
    }

    .search-box .form-control {
        min-height: 52px;
        border: 0;
        box-shadow: none;
        padding-right: 18px;
    }

.category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 3px 2px 8px;
    scrollbar-width: thin;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 8px 16px;
    text-decoration: none;
    background: #fff;
    color: #495057;
    border: 1px solid var(--border);
    font-size: 0.92rem;
    font-weight: 650;
    transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}

    .category-pill:hover,
    .category-pill.active {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-soft);
        transform: translateY(-1px);
    }

/* =========================
   🧱 PRODUTOS
========================= */
.products-section {
    padding: 8px 0 30px;
}

.section-eyebrow {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-title {
    font-weight: 850;
    letter-spacing: -0.03em;
}

.product-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .product-card:hover {
        transform: translateY(-4px);
        border-color: rgba(25, 135, 84, 0.28);
        box-shadow: var(--shadow-md);
    }

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f1f3f5;
}

.product-image {
    width: 100%;
    height: 214px;
    object-fit: cover;
    transition: transform .25s ease;
}

.product-card:hover .product-image {
    transform: scale(1.04);
}

.product-title {
    margin-bottom: 8px;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.25;
}

.product-description {
    display: -webkit-box;
    min-height: 42px;
    margin-bottom: 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price {
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.badge-promo,
.badge-promo-pill,
.badge-info-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.badge-promo,
.badge-promo-pill {
    background: var(--danger);
}

.badge-indisponivel {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #212529;
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-info-pill {
    background: var(--primary);
}

.btn-success {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 750;
    border-radius: 13px;
}

    .btn-success:hover,
    .btn-success:focus {
        background: var(--primary-dark);
        border-color: var(--primary-dark);
    }

/* =========================
   📦 MODAL
========================= */
.product-modal {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
}

.product-modal-image {
    width: 100%;
    max-height: 470px;
    object-fit: cover;
    border-radius: 18px;
    background: #f1f3f5;
}

.modal-product-title {
    margin-bottom: 8px;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 850;
    letter-spacing: -0.03em;
}

.modal-price {
    font-size: 1.7rem;
}

/* =========================
   ✅ CHECKOUT
========================= */
.checkout-wrapper {
    padding: 34px 0 56px;
}

.checkout-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.checkout-header {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 24px 28px;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-soft) 100%);
    border-bottom: 1px solid var(--border);
}

.checkout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background: var(--primary);
    color: #fff;
    font-size: 1.4rem;
}

.checkout-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.checkout-subtitle {
    color: var(--muted);
}

.checkout-form .form-label {
    font-weight: 750;
}

.checkout-form .form-control {
    border-color: var(--border);
    border-radius: 14px;
}

    .checkout-form .form-control:focus {
        border-color: rgba(25, 135, 84, 0.6);
        box-shadow: 0 0 0 .25rem rgba(25, 135, 84, 0.13);
    }

.checkout-alert {
    padding-right: 44px;
    border-radius: 16px;
}

/* =========================
   🕳️ ESTADO VAZIO
========================= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 26px;
    padding: 34px 18px;
    border: 1px dashed #ced4da;
    border-radius: 22px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}

    .empty-state i {
        color: var(--primary);
        font-size: 2rem;
    }

    .empty-state strong {
        color: var(--dark);
    }

/* =========================
   📱 RESPONSIVO
========================= */
@media (max-width: 767.98px) {
    body {
        padding-bottom: 72px;
    }

    .hero-store {
        padding: 34px 0 30px;
    }

    .store-logo {
        width: 94px;
        height: 94px;
    }

    .store-toolbar {
        margin-top: -20px;
        padding-bottom: 16px;
    }

    .search-box {
        border-radius: 18px;
    }

        .search-box .form-control {
            min-height: 50px;
        }

    .product-image {
        height: 190px;
    }

    .product-card:hover {
        transform: none;
    }

    .checkout-wrapper {
        padding-top: 18px;
    }

    .checkout-header {
        padding: 20px;
    }
}

@media (max-width: 575.98px) {
    .brand-text {
        font-size: 0.98rem;
    }

    .section-heading {
        margin-bottom: 12px !important;
    }

    .product-image {
        height: 112px;
    }

    .product-card .card-body {
        padding: 9px;
    }

    .product-title {
        font-size: 0.84rem;
    }

    .product-description {
        display: none;
    }
}

/* =========================
   MODAL PRODUTO
========================= */

.product-modal {
    border: none;
    border-radius: 18px;
    overflow: hidden;
}

.product-modal-header {
    border-bottom: 1px solid var(--border);
    padding: 14px 18px;
}

.product-modal-title-header {
    font-size: 1rem;
    font-weight: 700;
}

.product-modal-body {
    padding: 18px;
}

.product-modal-image {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 16px;
    background: #f8f9fa;
}

.modal-product-title {
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-price {
    font-size: 1.45rem;
    margin-bottom: 14px;
}

.modal-product-description {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.55;
    white-space: pre-line;
}

.product-modal-footer {
    border-top: 1px solid var(--border);
    padding: 14px 18px;
    background: #fff;
}

/* =========================
   MODAL PRODUTO
========================= */

.product-modal {
    border: none;
    border-radius: 18px;
    overflow: hidden;
}

.product-modal-header {
    border-bottom: 1px solid var(--border);
    padding: 14px 18px;
}

.product-modal-title-header {
    font-size: 1rem;
    font-weight: 700;
}

.product-modal-body {
    padding: 18px;
}

.product-modal-image {
    width: 100%;
    height: 340px;
    object-fit: cover;
    border-radius: 16px;
    background: #f8f9fa;
}

.modal-product-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-price {
    font-size: 1.45rem;
    margin-bottom: 12px;
}

.modal-product-description {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.5;
    white-space: pre-line;
}

.product-modal-footer {
    border-top: 1px solid var(--border);
    padding: 14px 18px;
    background: #fff;
}

/* =========================
   MOBILE COMPACTO
========================= */

@media (max-width: 575.98px) {

    .btn-view-product {
        min-height: 34px;
        padding: 6px 8px;
        font-size: 0.82rem;
        border-radius: 9px;
    }

    .product-modal {
        border-radius: 0;
    }

    .product-modal-header {
        padding: 9px 12px;
        min-height: 48px;
    }

    .product-modal-title-header {
        font-size: 0.92rem;
        max-width: calc(100vw - 68px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .product-modal-body {
        padding: 10px 12px;
    }

    .product-modal-image {
        height: 190px;
        border-radius: 12px;
    }

    .modal-price {
        font-size: 1.22rem;
        margin-top: 2px;
        margin-bottom: 8px;
    }

    .modal-product-description {
        font-size: 0.9rem;
        line-height: 1.4;
        max-height: 120px;
        overflow-y: auto;
        padding-right: 4px;
    }

    .product-modal-footer {
        padding: 10px 12px;
        position: sticky;
        bottom: 0;
        z-index: 5;
        box-shadow: 0 -8px 18px rgba(0,0,0,0.08);
    }

        .product-modal-footer .btn {
            min-height: 42px;
            font-size: 0.93rem;
            border-radius: 12px;
        }
}
/* =========================
   CARRINHO - POSIÇÃO DO BOTÃO
========================= */

.cart-summary-card {
    position: sticky;
    top: 90px;
}

.cart-summary-actions {
    margin-top: 18px;
}

.cart-checkout-btn {
    min-height: 48px;
    border-radius: 13px;
    font-weight: 700;
}

/* Mobile: botão fixo no rodapé */
@media (max-width: 767.98px) {

    .cart-wrapper {
        padding-bottom: 92px;
    }

    .cart-summary-card {
        position: static;
    }

    .cart-summary-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        background: #fff;
        padding: 10px 14px 12px;
        border-top: 1px solid var(--border);
        box-shadow: 0 -8px 24px rgba(0,0,0,0.10);
    }

    .cart-checkout-btn {
        min-height: 44px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .cart-back-link {
        display: block;
        font-size: 0.85rem;
        padding: 4px 0 0;
        margin-top: 4px !important;
        color: var(--primary);
        text-decoration: none;
        font-weight: 600;
    }
}
/* =========================
   CARRINHO NO TOPO
========================= */

.app-navbar .container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.navbar-brand {
    min-width: 0;
    flex: 1 1 auto;
}

.brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-btn-top {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    min-height: 40px;
    padding: 8px 13px;
    font-size: 0.92rem;
    font-weight: 700;
}

.cart-count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
}

/* Remove comportamento antigo do carrinho flutuante */
.cart-floating {
    display: none !important;
}

/* Mobile compacto */
@media (max-width: 575.98px) {

    .app-navbar .container {
        min-height: 52px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .brand-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .brand-text {
        font-size: 0.95rem;
        max-width: calc(100vw - 150px);
    }

    .cart-btn-top {
        min-height: 36px;
        padding: 7px 10px;
        gap: 6px;
        font-size: 0.84rem;
    }

    .cart-btn-text {
        display: none;
    }

    .cart-count {
        min-width: 20px;
        height: 20px;
        font-size: 0.72rem;
    }
}