/* style.css - Diseño Premium y Componentes de Compra */

:root {
    --primary: #2ecc71; /* Verde fresco alimenticio */
    --primary-dark: #27ae60;
    --dark: #1e272c;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', Outfit, Montserrat, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--dark);
    min-height: 100vh;
}

/* Header */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo a {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo span { color: var(--primary); }
.nav-menu a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}
.nav-menu a:hover { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 20px; }

.header-icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--dark);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.header-icon-btn:hover { color: var(--primary); }

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* Carrito Lateral (Cart Drawer) */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer.active {
    transform: translateX(0);
}

.cart-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-drawer-header h3 { font-size: 18px; font-weight: 700; }
.close-drawer-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

.cart-drawer-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Tarjeta de Producto en el Carrito */
.cart-item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}
.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.cart-item-details { flex-grow: 1; }
.cart-item-title { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.cart-item-price { font-size: 14px; color: var(--primary-dark); font-weight: 700; }
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.qty-btn {
    background: #f1f5f9;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover { background: #e2e8f0; }

.remove-item-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s;
}
.remove-item-btn:hover { color: #c0392b; }

.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.checkout-btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}
.checkout-btn-primary:hover { background: var(--primary-dark); }

/* Layout de Checkout */
.checkout-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}
.checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
}
@media (max-width: 900px) {
    .checkout-grid { grid-template-columns: 1fr; }
}

.checkout-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}
.checkout-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Formulario */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    background-color: #f8fafc;
    transition: all 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15);
}
.textarea-counter {
    text-align: right;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Detalle Pedido Derecho */
.order-summary-list { margin-bottom: 20px; }
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dotted var(--border-color);
    font-size: 14px;
}
.summary-totals {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}
.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: 10px;
}

/* Opciones de Pago */
.payment-methods { margin: 25px 0; }
.payment-option {
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.payment-option:hover { background-color: #f8fafc; }
.payment-option input {
    margin-right: 10px;
    accent-color: var(--primary);
}
.payment-option-title { font-weight: 600; font-size: 14px; }
.payment-option-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 24px;
    margin-top: 4px;
}

.terms-container {
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
}
.terms-container input {
    accent-color: var(--primary);
    margin-top: 3px;
}