/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE e Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
    width: 0;
    height: 0;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Desktop: Limitar largura máxima e centralizar */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        padding: 30px 40px;
    }
}

/* Header */
.header {
    text-align: center;
    color: #dc3545;
    padding: 20px 20px;
    margin-bottom: 0;
    background: white;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border-bottom: none;
    width: 100%;
}

/* Desktop: Header melhor organizado */
@media (min-width: 1200px) {
    .header {
        padding: 40px 40px 30px;
        max-width: 1400px;
        margin: 0 auto;
    }
}

.logo-container {
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transition: none;
}

.logo-container:hover {
    transform: none;
    box-shadow: none;
}

.logo-image {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: none;
    transition: none;
    display: block;
}

.logo-image:hover {
    transform: none;
}

.header h1 {
    font-size: 2.5rem;
    margin: 0;
    color: #dc3545;
    font-weight: bold;
    text-align: center;
}

.header p {
    font-size: 1.2rem;
    color: #666;
}

.store-description {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Indicador de Status da Loja */
.store-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
    animation: pulse 2s infinite;
}

.store-status-indicator.status-open {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.store-status-indicator.status-closed {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.5s infinite;
}

.status-open .status-dot {
    background: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
}

.status-closed .status-dot {
    background: #dc3545;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.6);
}

.status-text {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 100%;
}

/* Desktop: Melhor organização do conteúdo */
@media (min-width: 1200px) {
    .main-content {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Products Section */
.products-section {
    flex: 1;
    background: white;
    padding: 20px;
    overflow-y: auto;
    min-height: 0;
    max-width: 100%;
}

/* Desktop: Melhor espaçamento */
@media (min-width: 1200px) {
    .products-section {
        padding: 30px 40px;
    }
}

.product-section {
    margin-bottom: 50px;
}

.product-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #dc3545;
    text-transform: capitalize;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

/* Desktop: Limitar número máximo de colunas */
@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        max-width: 100%;
        gap: 25px;
    }
}

@media (min-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}


.product-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid #e9ecef;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #dc3545;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #f8f9fa;
    display: block;
}

.product-image-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 3rem;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.3;
}

.product-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
    min-height: 40px;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #dc3545;
    margin-bottom: 20px;
    margin-top: auto;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

/* Garantir que botões de filtro não sejam afetados pela classe .btn */
.btn-filter-category.btn {
    padding: 10px 20px !important;
    border: 2px solid #dc3545 !important;
    border-radius: 25px !important;
    font-size: 0.95rem !important;
}

.btn-primary {
    background: #dc3545;
    color: white;
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: #c82333;
    transform: scale(1.02);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-block {
    width: 100%;
}

.btn-add-product {
    width: 100%;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    max-height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0,0,0,0.2);
    transition: right 0.3s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Desktop: Carrinho com largura adequada */
@media (min-width: 1200px) {
    .cart-sidebar {
        width: 450px;
        right: -450px;
    }
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    color: #dc3545;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header h2 i {
    font-size: 1.3rem;
}

.btn-close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.cart-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cart-item-name {
    font-weight: 600;
    color: #333;
}

.cart-item-price {
    color: #dc3545;
    font-weight: 600;
}

.cart-item-additionals {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
    padding-left: 10px;
}

.cart-item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-quantity {
    background: #dc3545;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-quantity:hover {
    background: #c82333;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
}

.cart-footer {
    padding: 20px;
    border-top: 2px solid #e9ecef;
    background: #f8f9fa;
}

.cart-summary {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: bold;
    color: #dc3545;
    border-top: 2px solid #e9ecef;
    padding-top: 10px;
    margin-top: 10px;
}

/* Cart Toggle Button */
.btn-cart-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.4);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: transform 0.3s;
}

.btn-cart-toggle i {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.btn-cart-toggle span {
    font-size: 0.7rem;
    font-weight: bold;
    position: absolute;
    top: -5px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.btn-cart-toggle:hover {
    transform: scale(1.1);
    background: #c82333;
}

/* Animações do carrinho */
@keyframes cartBounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.15) rotate(-12deg);
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    75% {
        transform: scale(1.15) rotate(12deg);
    }
}

@keyframes cartPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.4);
    }
}

@keyframes cartShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-8px);
    }
    75% {
        transform: translateX(8px);
    }
}

.btn-cart-toggle.animate i {
    animation: cartBounce 0.6s ease;
}

.btn-cart-toggle.animate span {
    animation: cartPulse 0.5s ease;
}

.btn-cart-toggle.shake {
    animation: cartShake 0.4s ease;
}

.btn-cart-toggle span {
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #dc3545;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 2px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Additional Selection */
.additional-category {
    margin-bottom: 25px;
}

.additional-category h3 {
    color: #dc3545;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.additional-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.additional-info {
    flex: 1;
}

.additional-name {
    font-weight: 600;
    color: #333;
}

.additional-price {
    color: #666;
    font-size: 0.9rem;
}

.additional-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-input {
    width: 60px;
    padding: 5px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Checkout Form */
.checkout-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #dc3545;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
}

.coupon-input-group input {
    flex: 1;
}

.coupon-message {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
}

.coupon-message.success {
    color: #28a745;
}

.coupon-message.error {
    color: #dc3545;
}

.checkout-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #28a745;
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    background: #dc3545;
}

/* Filtros de Categoria - Estilos com alta especificidade */
main .category-filters,
.main-content .category-filters,
.category-filters {
    margin-bottom: 30px !important;
    padding: 20px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: center !important;
    border-bottom: 2px solid #eee !important;
    width: 100% !important;
    background: white !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    flex-direction: row !important;
}

main .btn-filter-category,
.main-content .btn-filter-category,
.category-filters .btn-filter-category,
button.btn-filter-category,
.btn-filter-category {
    padding: 10px 20px !important;
    border: 2px solid #dc3545 !important;
    background: white !important;
    color: #dc3545 !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
    font-size: 0.95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    text-decoration: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
}

main .btn-filter-category i,
.main-content .btn-filter-category i,
.category-filters .btn-filter-category i,
button.btn-filter-category i,
.btn-filter-category i {
    font-size: 0.9rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

main .btn-filter-category:hover,
.main-content .btn-filter-category:hover,
.category-filters .btn-filter-category:hover,
button.btn-filter-category:hover,
.btn-filter-category:hover {
    background: #f8f9fa !important;
    transform: scale(1.05) !important;
    border-color: #dc3545 !important;
    color: #dc3545 !important;
}

main .btn-filter-category.active,
.main-content .btn-filter-category.active,
.category-filters .btn-filter-category.active,
button.btn-filter-category.active,
.btn-filter-category.active {
    background: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

main .btn-filter-category.active:hover,
.main-content .btn-filter-category.active:hover,
.category-filters .btn-filter-category.active:hover,
button.btn-filter-category.active:hover,
.btn-filter-category.active:hover {
    background: #c82333 !important;
    transform: scale(1.05) !important;
    border-color: #c82333 !important;
    color: white !important;
}

/* Desktop: Melhorias gerais (filtros mantêm estilo do mobile) */
@media (min-width: 769px) {
    .header h1 {
        font-size: 3rem;
    }
    
    .header p {
        font-size: 1.3rem;
    }
    
    .store-description {
        font-size: 1.1rem;
        max-width: 800px;
        margin: 0 auto;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .product-card {
        transition: transform 0.3s, box-shadow 0.3s;
    }
    
    .product-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    }
    
    /* Ajustar filtros para desktop - alinhar com products-section */
    .category-filters {
        padding: 20px 40px !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        align-items: center !important;
    }
    
    .category-filters .btn-filter-category {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
}

/* Desktop grande: Ajustar filtros para alinhar com products-section */
@media (min-width: 1200px) {
    .category-filters {
        padding: 30px 40px !important;
        margin-left: 0;
        margin-right: 0;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        overflow-x: visible !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .category-filters .btn-filter-category {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .products-section {
        padding: 25px 30px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 15px 15px;
        gap: 8px;
    }
    
    .logo-container {
        padding: 0;
    }
    
    .logo-image {
        max-width: 100%;
        max-height: 150px;
    }
    
    .store-description {
        font-size: 0.75rem;
        padding: 0;
    }
    
    .products-section {
        padding: 15px;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-image,
    .product-image-placeholder {
        height: 200px;
    }
    
    .product-name {
        font-size: 1.2rem;
    }
    
    .product-price {
        font-size: 1.5rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .main-content {
        flex-direction: column;
    }
}

