/*
Theme Name: E-Delivery
Description: Sistema completo de delivery para pizzarias com carrinho, personalização de pizzas e múltiplas formas de pagamento
Version: 1.0
Author: E-Limao / Tritao
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.site-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.pizza-icon {
    width: 2rem;
    height: 2rem;
}

.header-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.info-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Main Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    padding: 2rem 0;
}

/* Menu Section */
.menu-section {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.menu-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 2rem;
}

.size-selection, .category-selection {
    margin-bottom: 2rem;
}

.selection-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.selection-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: #e5e7eb;
    color: #374151;
}

.selection-btn:hover {
    background: #d1d5db;
}

.selection-btn.active {
    background: #dc2626;
    color: white;
}

.selection-btn.category.active {
    background: #ea580c;
}

/* Pizza Grid */
.pizza-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.pizza-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pizza-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.pizza-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #fed7aa 0%, #fecaca 100%);
}

.pizza-content {
    padding: 1.5rem;
}

.pizza-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.pizza-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.pizza-category {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-doces {
    background: #fce7f3;
    color: #be185d;
}

.category-salgadas {
    background: #dcfce7;
    color: #166534;
}

.pizza-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.pizza-ingredients {
    margin-bottom: 1rem;
}

.ingredients-label {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.ingredients-list {
    font-size: 0.875rem;
    color: #374151;
}

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

.pizza-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #dc2626;
}

.add-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-btn:hover {
    background: #b91c1c;
}

.add-icon {
    width: 1rem;
    height: 1rem;
}

/* Cart Sidebar */
.cart-sidebar {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.cart-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.cart-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #dc2626;
}

.cart-count {
    background: #dc2626;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    min-width: 1.5rem;
    text-align: center;
}

.cart-content {
    padding: 1.5rem;
}

.cart-empty {
    text-align: center;
    color: #6b7280;
    padding: 2rem 0;
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.cart-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

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

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

.cart-item-details {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: #dc2626;
}

.remove-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.remove-btn:hover {
    background: #f3f4f6;
}

.remove-icon {
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
}

/* Delivery and Payment Options */
.option-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.option-title {
    font-weight: 500;
    margin-bottom: 1rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.option-radio {
    width: 1rem;
    height: 1rem;
    accent-color: #dc2626;
}

.option-icon {
    width: 1rem;
    height: 1rem;
}

.option-label {
    font-size: 0.875rem;
}

.address-input, .cash-input {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.change-amount {
    font-size: 0.875rem;
    color: #059669;
    margin-top: 0.5rem;
}

/* Total Section */
.total-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.total-final {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.125rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.total-price {
    color: #dc2626;
}

.checkout-btn {
    width: 100%;
    background: #dc2626;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
}

.checkout-btn:hover {
    background: #b91c1c;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
}

.close-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background: #f3f4f6;
}

.close-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.pizza-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pizza-modal-image {
    width: 100px;
    height: 100px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.pizza-modal-details h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pizza-modal-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.pizza-modal-price {
    font-size: 1.125rem;
    font-weight: bold;
    color: #dc2626;
}

.option-box {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: #dc2626;
}

.select-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.additionals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.additional-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.additional-label {
    font-size: 0.875rem;
}

.additional-price {
    font-size: 0.875rem;
    color: #dc2626;
}

.quantity-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.quantity-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantity-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.quantity-btn:hover {
    background: #f3f4f6;
}

.quantity-icon {
    width: 1rem;
    height: 1rem;
}

.quantity-display {
    width: 2rem;
    text-align: center;
    font-weight: 500;
}

.add-to-cart-btn {
    width: 100%;
    background: #dc2626;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1.125rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-to-cart-btn:hover {
    background: #b91c1c;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pizza-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .pizza-info {
        flex-direction: column;
        text-align: center;
    }
    
    .additionals-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }