/* Variáveis e Design System para a Loja */
:root {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.85);
    --bg-card: #ffffff;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.25);
    
    --accent: #0ea5e9;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-pure: #0f172a;
    --text-primary: #334155;
    --text-secondary: #64748b;
    
    --border-light: rgba(0, 0, 0, 0.08);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius-sm: 12px;
    --border-radius-md: 20px;
    --border-radius-lg: 32px;
}

/* Reset Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-pure);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================== NAVBAR ================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    height: 100px;
    display: flex;
    align-items: center;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, height 0.4s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    height: 80px;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-pure);
}

.logo i {
    color: var(--accent);
    font-size: 1.8rem;
}

.logo-highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-admin {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem !important;
}

.cart-trigger {
    position: relative;
    cursor: pointer;
    background: var(--bg-surface);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.cart-trigger:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 15px var(--primary-glow);
    transform: translateY(-2px);
}

.cart-trigger i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================== HERO SECTION ================== */
.hero {
    position: relative;
    padding: 150px 20px 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center top, #ffffff 0%, var(--bg-base) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 80vw;
    background: var(--accent);
    filter: blur(150px);
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-chip {
    display: inline-block;
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 1px solid rgba(14, 165, 233, 0.2);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.05);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-inline: auto;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn i {
    font-size: 1.2rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: var(--success-hover);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ================== PRODUCTS SECTION ================== */
.products-section {
    padding: 60px 20px 100px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-secondary);
}

/* Store Controls (Search & Filters) */
.store-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
    align-items: center;
}

.search-bar {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.search-bar input {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
    background: #ffffff;
    font-size: 1rem;
    color: var(--text-pure);
    font-family: var(--font-body);
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-chip {
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--border-light);
    background: #ffffff;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px var(--primary-glow);
}

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

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.product-card:hover::before {
    opacity: 1;
}

.card-img-wrapper {
    width: 100%;
    height: 240px;
    background: #fdfdfd;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-img-wrapper img {
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

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

.placeholder-img {
    color: var(--text-secondary);
    font-size: 3rem;
    opacity: 0.3;
}

.badge-esgotado {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--warning);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.product-category {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.25rem;
    color: var(--text-pure);
    margin-bottom: 10px;
    font-weight: 600;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.product-price {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-pure);
}

.btn-add-cart {
    background: var(--primary);
    border: none;
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--primary-glow);
    flex-shrink: 0;
    overflow: hidden; /* esconde label no desktop */
}

/* Esconde o texto no desktop — só o ícone aparece */
.btn-add-label {
    display: none;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.btn-add-cart:not(:disabled):hover {
    background: var(--primary-hover);
    transform: scale(1.1);
    box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-add-cart:not(:disabled):active {
    transform: scale(0.95);
}

/* ================== CARRINHO SIDEBAR ================== */
.cart-overlay, .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-surface);
    z-index: 1000;
    box-shadow: none; /* sem sombra quando fora da tela */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}

.cart-sidebar.open {
    transform: translateX(-400px);
    box-shadow: -10px 0 30px rgba(0,0,0,0.4); /* sombra só quando aberto */
}
.cart-overlay.open, .modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart, .close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-cart:hover, .close-modal:hover {
    color: var(--text-pure);
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    -webkit-overflow-scrolling: touch; /* scroll com inércia no iOS */
    overscroll-behavior: contain;      /* não propaga scroll para a página */
    touch-action: pan-y;               /* garante detecção de swipe vertical */
}

.empty-cart-msg {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 50px;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    background: var(--bg-card);
    padding: 15px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-light);
    position: relative;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    background: var(--bg-surface);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-img img {
    max-height: 80%;
    object-fit: contain;
}

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

.cart-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-pure);
}

.cart-item-price {
    color: var(--primary);
    font-weight: 700;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.qty-btn {
    background: rgba(0,0,0,0.05);
    border: none;
    color: var(--text-pure);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    background: rgba(0,0,0,0.1);
}

.cart-item-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.cart-item-remove:hover {
    color: var(--danger);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-surface);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-pure);
    margin-bottom: 20px;
}

/* Checkbox e Botão Voltar */
.cart-item-check-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 5px;
}

.cart-item-check {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
    border-radius: 6px;
}

.cart-item.unselected {
    opacity: 0.6;
    background: #f1f5f9;
}

.btn-back-shopping {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-back-shopping:hover {
    color: var(--primary);
}

/* ================== CHECKOUT MODAL ================== */
.checkout-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 500px;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.checkout-modal.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--border-radius-lg);
    padding: 35px;
    box-shadow: 0 40px 60px -15px rgba(0, 0, 0, 0.15);
}

.modal-header h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--text-pure);
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

/* Product Details Modal Layout */
.product-modal {
    max-width: 800px;
}

.product-modal-layout {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

.product-modal-gallery {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    background: #f8fafc;
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
}

.main-image img {
    max-height: 100%;
    object-fit: contain;
}

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

.thumb-box {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    background: #f8fafc;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    transition: var(--transition);
}

.thumb-box.active, .thumb-box:hover {
    border-color: var(--primary);
}

.thumb-box img {
    max-height: 100%;
    object-fit: contain;
}

.product-modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-modal-info h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    margin-top: 5px;
}

.product-description {
    color: var(--text-secondary);
    margin-top: 20px;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    flex: 1;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    right: 15px;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 45px 14px 15px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    color: var(--text-pure);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.checkout-summary {
    background: #f1f5f9;
    padding: 20px;
    border-radius: var(--border-radius-sm);
    margin: 25px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-row span {
    color: var(--text-secondary);
}

.summary-row strong {
    font-size: 1.2rem;
    color: var(--accent);
}

/* ================== RESPONSIVIDADE MOBILE ================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .navbar {
        height: 70px;
    }
    .navbar.scrolled {
        height: 60px;
    }
    .logo img {
        height: 55px !important;
    }
    
    .hero {
        padding: 110px 20px 60px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 0.95rem;
    }
    
    .products-section {
        padding: 40px 16px 80px;
    }

    /* Grid: 2 colunas em tablets pequenos */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    /* Card mais compacto */
    .product-card {
        padding: 12px;
    }
    .card-img-wrapper {
        height: 160px;
        margin-bottom: 12px;
    }
    .product-title {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    .product-footer {
        padding-top: 10px;
    }
    .product-price {
        font-size: 1.1rem;
    }

    /* Botão adicionar mobile: flex:1 dentro do card-actions row */
    .card-actions {
        width: 100%;
        gap: 8px;
    }
    .btn-add-cart {
        flex: 1;           /* ocupa espaço restante após qty-selector */
        min-width: 0;      /* permite flex shrink correto */
        width: auto;       /* anula qualquer width fixo anterior */
        height: 42px;
        border-radius: var(--border-radius-sm);
        font-size: 1rem;
        gap: 8px;
        overflow: visible;
    }
    .btn-add-label {
        display: inline;
        font-size: 0.82rem;
        font-weight: 600;
    }
    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;          /* espaço entre preço e card-actions */
        padding-top: 10px;
    }

    /* Filtros: scroll horizontal */
    .category-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        scrollbar-width: none;
    }
    .category-filters::-webkit-scrollbar { display: none; }
    .filter-chip {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Carrinho */
    .cart-sidebar {
        width: 100%;
        max-width: 100%;
        right: -100vw;
        height: 100vh;
        height: 100dvh;
    }
    .cart-sidebar.open {
        transform: translateX(-100vw);
    }

    /* Modal de produto */
    .product-modal-layout {
        flex-direction: column;
        max-height: 85dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .main-image {
        height: 200px;
    }
    .checkout-modal {
        width: 95%;
        max-height: 90dvh;
    }
    .glass-panel {
        padding: 24px 20px;
    }
}

/* Extra small: 1 coluna em telas muito pequenas */
@media (max-width: 420px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    .card-img-wrapper {
        height: 200px;
    }
    .btn-add-cart {
        height: 44px;
        font-size: 0.9rem;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
}

/* ================== NOVA / PROMO BADGES ================== */
.badge-novo {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--success);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.badge-promo {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Badge Destaque — chip escuro */
.badge-destaque {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #1e293b;
    color: #f8fafc;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Avaliação com estrelas */
.star-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1;
}

.star-filled  { color: #f59e0b; }
.star-half    { color: #f59e0b; opacity: 0.55; }
.star-empty   { color: #cbd5e1; }

.rating-num {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 4px;
}

/* Preço com risco + destaque promocional */
.product-price-area {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-original {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    line-height: 1.2;
}

.price-promo {
    color: var(--danger) !important;
}

/* ================== SORT SELECT ================== */
.controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 700px;
    flex-wrap: wrap;
    justify-content: center;
}

.controls-row .category-filters {
    flex: 1;
}

.sort-select {
    padding: 9px 14px;
    border-radius: 30px;
    border: 1px solid var(--border-light);
    background: #ffffff;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

/* ================== QUANTIDADE SELETOR NO CARD ================== */
.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f1f5f9;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.qty-selector button {
    background: transparent;
    border: none;
    width: 30px;
    height: 36px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-selector button:hover {
    background: rgba(0,0,0,0.08);
}

.qty-val {
    min-width: 26px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-pure);
}

/* ================== COMPARTILHAR BOTÃO ================== */
.btn-share {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.btn-share:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

/* ================== TOAST ================== */
#toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    align-items: center;
}

.toast {
    background: #1e293b;
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    white-space: nowrap;
    max-width: 90vw;
}

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

.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--accent); }

/* ================== VOLTAR AO TOPO ================== */
#back-to-top {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--primary-glow);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 500;
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
}

/* ================== FOOTER CORPORATIVO ================== */

.loja-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    margin-top: 80px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding: 56px 24px 40px;
}

.footer-brand .footer-logo {
    height: 70px;
    filter: brightness(0.15);
    margin-bottom: 16px;
    display: block;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
}

.footer-col h4 {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-pure);
    margin-bottom: 18px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    font-size: 0.93rem;
    transition: color 0.2s;
    text-decoration: none;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding: 20px 24px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.84rem;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
        padding: 40px 20px 28px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 420px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ================== PÁGINAS INTERNAS (Sobre, Dúvidas, Contato) ================== */

/* Navbar para páginas internas (sem carrinho) */
.page-nav-links a {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    padding: 6px 0;
}
.page-nav-links a:hover,
.page-nav-links a.active { color: var(--primary); }

/* Hero interno */
.page-hero {
    padding: 140px 24px 80px;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}
.page-hero-chip {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 20px;
}
.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: var(--text-pure);
    margin-bottom: 16px;
    line-height: 1.2;
}
.page-hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Seção de conteúdo */
.page-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 24px 100px;
}

/* Cards info (Sobre) */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 48px;
}
.info-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 28px 24px;
    transition: var(--transition);
}
.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}
.info-card-icon {
    font-size: 2rem;
    margin-bottom: 14px;
    display: block;
}
.info-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-pure);
    margin-bottom: 8px;
}
.info-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* FAQ Acordeão */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 48px;
}
.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: var(--transition);
}
.faq-item.open {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.08);
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.97rem;
    color: var(--text-pure);
    gap: 16px;
    user-select: none;
}
.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--primary);
}
.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    font-size: 0.93rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding: 0 24px;
}
.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 24px 20px;
}

/* Formulário de Contato */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: start;
    margin-top: 48px;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}
.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    background: var(--bg-surface);
    color: var(--text-pure);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.form-feedback {
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
}
.form-feedback.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; display: block; }
.form-feedback.error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; display: block; }

.contact-info-block {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 32px 28px;
}
.contact-info-block h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-pure);
    margin-bottom: 24px;
}
.contact-info-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.contact-info-item svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}
.contact-info-item p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.contact-info-item strong {
    color: var(--text-pure);
    display: block;
    margin-bottom: 2px;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .page-hero {
        padding: 120px 20px 60px;
    }
    .info-cards {
        grid-template-columns: 1fr;
    }
}


/* ================== ANIMATIONS (PARALLAX/FADE) ================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.product-card {
    will-change: transform, box-shadow;
    transform-style: preserve-3d;
}

/* ================== SHIMMER SKELETONS ================== */
.skeleton-card {
    border: 1px solid var(--border-light);
    pointer-events: none;
    background: transparent;
    box-shadow: none;
}
.skeleton-card:hover { transform: none; box-shadow: none; }

.skeleton-img, .skeleton-text {
    background: #e2e8f0;
    animation: shimmer 1.8s infinite linear;
    background-image: linear-gradient(90deg, #f1f5f9 0px, #ffffff 40px, #f1f5f9 80px);
    background-size: 200% 100%;
}

.skeleton-img {
    width: 100%;
    height: 240px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
}

.skeleton-text {
    height: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.skeleton-text.short { width: 40%; }
.skeleton-text.long { width: 80%; height: 24px; }
.skeleton-text.med { width: 60%; margin-top: 15px; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================== FLY TO CART & MAGNETIC ================== */
.flying-img {
    position: fixed;
    z-index: 9999;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    /* Transition set via JS */
}

@keyframes cartBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.3) translateY(-4px) rotate(-10deg); }
    60% { transform: scale(0.9) translateY(2px) rotate(5deg); }
    100% { transform: scale(1); }
}

.cart-trigger.bounce {
    animation: cartBounce 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.cart-trigger.bounce i {
    color: var(--primary);
}

.magnetic-element {
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.2s, background 0.2s;
    will-change: transform;
}
.magnetic-element:hover {
    transition: transform 0.05s linear, box-shadow 0.2s, background 0.2s;
}

/* Para animar filhos em escada quando entrarem */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
