/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Cabeçalho */
header {
    background-color: rgb(221, 113, 4);
    color: white;
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.cart-icon {
    position: relative;
    font-size: 1.5rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ffcc00;
    color: #333;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Navegação por categorias */
.categories-nav {
    background-color: rgb(243, 135, 63);
    padding: 10px 15px;
    position: sticky;
    top: 60px;
    z-index: 99;
    overflow-x: auto;
    white-space: nowrap;
}

.categories-container {
    display: flex;
    gap: 10px;
}

.category-btn {
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    flex-shrink: 0;
}

.category-btn.active {
    background-color: white;
    color: rgb(221, 113, 4);
}

.category-btn:hover {
    background-color: rgba(255,255,255,0.3);
}

/* Conteúdo principal */
main {
    padding: 15px;
    max-width: 100%;
}

/* Seções */
section {
    margin-bottom: 20px;
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

h2 {
    margin-bottom: 15px;
    color: rgb(221, 113, 4);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Categorias */
.category-section {
    display: none;
}

.category-section.active {
    display: block;
}

/* Produtos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 120px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 2rem;
}

.product-info {
    padding: 10px;
}

.product-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.product-price {
    color: #c00;
    font-weight: bold;
    margin-bottom: 10px;
}

.add-to-cart {
    background-color: rgb(221, 113, 4);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: rgb(255, 189, 7);
}

/* Carrinho */
.cart-items {
    margin-bottom: 15px;
}

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

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

.cart-item-name {
    font-weight: bold;
}

.cart-item-price {
    color: #666;
    font-size: 0.9rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
}

.quantity-btn {
    background-color: #eee;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
}

.quantity {
    margin: 0 10px;
    font-weight: bold;
}

.remove-item {
    color: #c00;
    background: none;
    border: none;
    margin-left: 10px;
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-total {
    text-align: right;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 15px 0;
}

.checkout-btn {
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: #128C7E;
}

.checkout-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Rodapé */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 20px;
}

/* Modal de confirmação */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.modal-cancel {
    background-color: #eee;
}

.modal-confirm {
    background-color: #25D366;
    color: white;
}

/* Responsividade */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-nav {
        top: 56px;
    }
}