:root {
    --primary-color: #f73874; /* Rosa vibrante */
    --primary-dark: #cc1b54; 
    --secondary-color: #ffb703; /* Amarillo dorado */
    --accent-color: #5c3a21; /* Marrón chocolate */
    --whatsapp-color: #25D366; 
    --success: #10b981;
    --danger: #ef4444;

    --background-color: #fffafb;
    --card-bg: rgba(255, 255, 255, 0.95);
    
    --text-main: #3d2616;
    --text-light: #8c7365;
    
    --glass-border: rgba(247, 56, 116, 0.15);
    --glass-shadow: 0 10px 30px 0 rgba(247, 56, 116, 0.08);
    --radius-lg: 28px;
    --radius-sm: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--background-color);
    color: var(--text-main);
    background-image: radial-gradient(circle at 10% 20%, rgba(247, 56, 116, 0.08) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(255, 183, 3, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
    padding-bottom: 100px;
}

h1, h2, h3, h4 { font-family: 'Fredoka', sans-serif; }

/* Header & Logo */
.glass-header { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--glass-border); padding: 1rem; position: sticky; top: 0; z-index: 100; display: flex; justify-content: center; }
.logo-container { height: 70px; }
.brand-logo { height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); }

/* Categories */
.categories-nav { padding: 1.2rem 0; overflow-x: auto; white-space: nowrap; position: sticky; top: 100px; z-index: 99; background: linear-gradient(to bottom, var(--background-color) 80%, transparent 100%); }
.categories-nav::-webkit-scrollbar { display: none; }
.categories-nav ul { list-style: none; display: flex; padding: 0 1.5rem; gap: 12px; }
.categories-nav li { padding: 10px 20px; background: white; border-radius: 25px; font-weight: 700; font-size: 0.95rem; color: var(--text-light); box-shadow: 0 4px 12px rgba(92, 58, 33, 0.05); cursor: pointer; transition: all 0.3s; border: 2px solid transparent; }
.categories-nav li.active { background: var(--primary-color); color: white; box-shadow: 0 6px 16px rgba(247, 56, 116, 0.3); border-color: var(--primary-color); }

/* Products Grid */
.products-container { padding: 0.5rem 1.5rem 2rem 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
.product-card { background: var(--card-bg); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--glass-shadow); border: 2px solid transparent; display: flex; flex-direction: column; transition: transform 0.2s, border-color 0.3s; cursor: pointer; }
.product-card:active { transform: scale(0.96); }
.product-card:hover { border-color: rgba(247, 56, 116, 0.3); }
.product-image-placeholder { width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, #ffeff3, #ffdee7); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 3rem; margin-bottom: 12px; }
.product-card h3 { font-size: 1.05rem; margin-bottom: 6px; color: var(--text-main); line-height: 1.2; }
.product-card p { font-size: 0.8rem; color: var(--text-light); margin-bottom: 14px; flex-grow: 1; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.price { font-weight: 800; color: var(--primary-color); font-size: 1.15rem; }
.add-btn { background: var(--secondary-color); color: var(--accent-color); border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: bold; box-shadow: 0 4px 10px rgba(255, 183, 3, 0.4); }

/* Floating Cart */
.floating-cart { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 400px; background: var(--primary-color); border: none; border-radius: 30px; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; color: white; font-weight: 800; font-family: 'Fredoka', sans-serif; font-size: 1.2rem; box-shadow: 0 10px 30px rgba(247, 56, 116, 0.4); z-index: 1000; transition: transform 0.2s; }
.floating-cart:active { transform: translateX(-50%) scale(0.95); }
.cart-icon { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; }
.cart-badge { background: var(--secondary-color); color: var(--accent-color); width: 24px; height: 24px; border-radius: 50%; font-size: 0.9rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* Modals */
.cart-overlay, .product-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(92, 58, 33, 0.5); backdrop-filter: blur(5px); z-index: 2000; display: none; align-items: flex-end; }
.cart-overlay.active, .product-modal-overlay.active { display: flex; animation: fadeIn 0.3s; }
.glass-modal { background: #ffffff; width: 100%; max-height: 90vh; border-radius: 32px 32px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,0.15); display: flex; flex-direction: column; animation: slideUp 0.3s cubic-bezier(0.1, 0.9, 0.2, 1); }

.cart-header, .modal-header { padding: 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f0f0f0; }
.cart-items { padding: 24px; overflow-y: auto; flex-grow: 1; }
.cart-footer { padding: 24px; background: white; border-top: 1px solid #f0f0f0; }
.cart-summary { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 1.3rem; font-weight: 800; color: var(--text-main); }

.form-input { width: 100%; padding: 14px; border: 2px solid #eaeaea; border-radius: 12px; font-family: 'Nunito', sans-serif; font-size: 1rem; color: var(--text-main); margin-bottom: 10px; background: #fafafa; outline: none; transition: border-color 0.2s; }
.form-input:focus { border-color: var(--primary-color); background: #fff; }

.btn-whatsapp { width: 100%; background: var(--whatsapp-color); color: white; border: none; padding: 18px; border-radius: 20px; font-family: 'Fredoka', sans-serif; font-size: 1.25rem; display: flex; justify-content: center; align-items: center; gap: 10px; box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3); font-weight: 600; cursor: pointer; }
.close-cart, .close-modal { background: var(--background-color); color: var(--text-main); border: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; cursor: pointer; }

/* Product Modal Tweaks */
.modal-image-placeholder { height: 160px; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; display: flex; justify-content: center; align-items: center; font-size: 5rem; }
.modal-body { padding: 24px; overflow-y: auto; }
.price-badge { display: inline-block; background: var(--secondary-color); color: var(--accent-color); padding: 8px 16px; border-radius: 20px; font-weight: 800; margin-top: 12px; font-size: 1.1rem; }
.modal-footer { padding: 24px; background: white; box-shadow: 0 -10px 20px rgba(0,0,0,0.03); }

/* Customization Wizard UI */
.modal-instruction { font-size: 0.95rem; color: var(--accent-color); background: #fff8e1; padding: 12px; border-radius: 12px; margin-top: 16px; text-align: center; border: 1px dashed var(--secondary-color); }
.modal-instruction-big { background: #fff8e1; padding: 20px; border-radius: 16px; margin-top: 16px; text-align: center; border: 2px dashed var(--secondary-color); box-shadow: 0 4px 15px rgba(255,183,3,0.15); }
.customization-section { margin-top: 24px; }
.customization-section h4 { font-family: 'Nunito', sans-serif; font-size: 1.15rem; color: var(--text-main); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.customization-section h4 span { font-size: 0.85rem; background: var(--primary-color); color: white; padding: 4px 10px; border-radius: 12px; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.option-btn { background: white; border: 2px solid #eaeaea; border-radius: 14px; padding: 12px; text-align: left; font-size: 0.9rem; font-weight: 600; color: var(--text-main); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: space-between; }
.option-btn.selected { border-color: var(--primary-color); background: #fff5f8; color: var(--primary-color); }
.option-btn i { font-size: 1.2rem; color: #ccc; }
.option-btn.selected i { color: var(--primary-color); }
.max-alert { color: var(--primary-color); font-size: 0.85rem; font-weight: bold; margin-top: 6px; display: none; text-align: center; }

/* Step Controls (Wizard) */
.step-section { display: none; animation: fadeIn 0.3s; }
.step-section.active { display: block; }

.wizard-controls { display: flex; gap: 10px; margin-top: 24px; }
.btn-outline { flex: 1; padding: 14px; border: 2px solid #eaeaea; border-radius: 16px; background: transparent; color: var(--text-light); font-family: 'Fredoka'; font-size: 1.1rem; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 6px; }
.btn-outline:active { background: #f0f0f0; }
.btn-primary-small { flex: 2; padding: 14px; border: none; border-radius: 16px; background: var(--primary-color); color: white; font-family: 'Fredoka'; font-size: 1.15rem; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 6px; box-shadow: 0 6px 15px rgba(247, 56, 116, 0.3); }

/* Quantity & Final Controls */
.quantity-selector { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 30px; margin-bottom: 20px; }
.qty-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: #f0f0f0; color: var(--text-main); font-size: 1.5rem; font-weight: 700; cursor: pointer; transition: background 0.2s;}
.qty-btn:active { background: #e0e0e0; }
#qty-value { font-size: 1.5rem; font-weight: 800; font-family: 'Fredoka'; width: 20px; text-align: center; }

.btn-primary { width: 100%; padding: 18px; border: none; border-radius: 20px; background: var(--primary-color); color: white; font-family: 'Fredoka'; font-size: 1.25rem; box-shadow: 0 8px 25px rgba(247, 56, 116, 0.4); cursor: pointer; display: flex; justify-content: center; gap: 10px; }
.btn-primary:active { transform: scale(0.98); }

/* Cart List */
.cart-item { display: flex; gap: 15px; padding: 20px 0; border-bottom: 1px solid #f0f0f0; }
.cart-item-icon { font-size: 2.5rem; background: #fff5f8; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 16px; }
.cart-item-details { flex-grow: 1; }
.cart-item-details h4 { font-family: 'Nunito', sans-serif; font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.cart-item-options { font-size: 0.8rem; color: var(--text-light); margin-bottom: 8px; line-height: 1.4; }
.cart-item-price-row { display: flex; justify-content: space-between; align-items: center; }
.cart-item-price { font-weight: 800; color: var(--primary-color); font-size: 1.1rem; }
.remove-item { color: #ff4757; background: #fff0f1; border: none; width: 32px; height: 32px; border-radius: 8px; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Toast */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px); background: var(--text-main); color: white; padding: 14px 24px; border-radius: 30px; font-weight: 700; font-size: 0.95rem; box-shadow: 0 10px 30px rgba(0,0,0,0.15); z-index: 3000; transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1); }
.toast.show { transform: translateX(-50%) translateY(0); }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
