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

:root {
    --bg-main: #090d16;
    --bg-card: rgba(22, 30, 49, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #f97316;
    --primary-gradient: linear-gradient(135deg, #ff7e40 0%, #ff4b2b 100%);
    --secondary: #ec4899;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent: #10b981; /* Success Green */
    --accent-red: #ef4444; /* Danger Red */
    --font-title: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-main);
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
*::-webkit-scrollbar-track {
    background: var(--bg-main);
}
*::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 20px;
}

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

/* Glassmorphism utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.logo {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--text-main);
    -webkit-text-fill-color: var(--text-main);
}

.cart-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-icon-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.5);
    border-color: transparent;
}

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

/* Hero Section */
.hero {
    padding: 4rem 2rem 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero h1 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.status-badge.open {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.closed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Categories Filter */
.categories-container {
    padding: 1rem 2rem;
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
    margin-bottom: 2rem;
    scrollbar-width: none;
    width: 100%;
}

.categories-container::-webkit-scrollbar {
    display: none;
}

.category-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-btn:hover, .category-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

@media (max-width: 768px) {
    .categories-container {
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
}

/* Products Grid */
.products-section {
    padding: 0 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.product-card {
    border-radius: 0.85rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.4);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card-hover);
}

.product-card.combo-highlight {
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.08);
}

.product-card.combo-highlight:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 Aspect Ratio */
    background: #1e293b;
    overflow: hidden;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-info {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
}

.add-btn {
    background: var(--primary-gradient);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
}

.out-of-stock {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Sidebar Carrinho */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    z-index: 100;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.cart-sidebar.open {
    right: 0;
}

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

.cart-header h2 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
}

.close-cart-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-cart-btn:hover {
    color: var(--text-main);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cart-item-details {
    flex-grow: 1;
    margin-right: 1rem;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.cart-item-obs {
    font-size: 0.75rem;
    color: var(--primary);
    font-style: italic;
}

.cart-item-price {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.25rem 0.5rem;
}

.qty-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.2s;
}

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

.cart-item-qty span {
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 15px;
    text-align: center;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    margin-left: 0.5rem;
}

.cart-item-remove:hover {
    opacity: 1;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.95);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.cart-total-row.grand-total {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.cart-total-row.grand-total span:last-child {
    color: var(--primary);
}

.checkout-btn {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.checkout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.6);
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #475569;
    box-shadow: none;
}

/* Modal Checkout */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.modal.open {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: 1.5rem;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

select.form-control option {
    background: var(--bg-main);
    color: var(--text-main);
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.radio-card {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-card i {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.radio-card span {
    font-size: 0.8rem;
}

.radio-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.radio-card.selected {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
}

.radio-card.selected i {
    color: var(--primary);
}

.radio-card.selected span {
    color: var(--text-main);
    font-weight: 600;
}

.order-summary-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.bairro-alerta {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: none;
}

/* Pix Modal Specifics */
.pix-container {
    text-align: center;
    padding: 1rem;
}

.pix-qr {
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    display: inline-block;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.pix-qr img {
    max-width: 200px;
    height: auto;
    display: block;
}

.copia-cola-wrapper {
    margin-bottom: 1.5rem;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-main);
}

.pix-status-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .radio-group {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .hero h1 {
        font-size: 2.25rem;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        padding: 1.5rem;
    }
}

/* Botão Flutuante do WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 95;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite;
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    transform: scale(1.1) rotate(10deg);
    color: #FFF;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Banner Carrossel do Catálogo */
.carousel-container {
    position: relative;
    max-width: 1200px;
    height: 360px;
    margin: 1.5rem auto;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.carousel-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 10;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Controles do Carrossel */
.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(9, 13, 22, 0.5);
    border: 1px solid var(--border-color);
    color: white;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 20;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev:hover, .carousel-next:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev { left: 1.25rem; }
.carousel-next { right: 1.25rem; }

/* Indicadores */
.carousel-dots {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 20;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.2);
    width: 18px;
    border-radius: 4px;
}

/* Responsivo */
@media (max-width: 768px) {
    .carousel-container {
        height: 180px;
        margin: 1rem auto;
        border-radius: 0.75rem;
    }
    .carousel-prev, .carousel-next {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .carousel-prev { left: 0.75rem; }
    .carousel-next { right: 0.75rem; }
}

@media (max-width: 576px) {
    .products-section {
        padding: 0 0.75rem 3rem;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .product-card {
        border-radius: 0.75rem;
    }
    .product-info {
        padding: 0.6rem;
    }
    .product-name {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }
    .product-desc {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
        line-height: 1.25;
    }
    .product-price {
        font-size: 0.95rem;
    }
    .add-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    .out-of-stock {
        padding: 0.15rem 0.5rem;
        font-size: 0.65rem;
    }
}
