/* CSS Design System - Organique Premium */
:root {
    /* Colores por defecto (Modo Claro) */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(12px);

    /* Constantes de color */
    --color-primary: #10b981;
    /* Esmeralda */
    --color-primary-hover: #059669;
    --color-primary-light: #d1fae5;
    --color-success: #10b981;
    --color-danger: #f43f5e;
    /* Rosado/Rojo moderno */
    --color-danger-hover: #e11d48;
    --color-warning: #f59e0b;
    /* Ámbar */
    --color-secondary: #475569;
    --color-secondary-hover: #334155;

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

/* Variables para Modo Oscuro */
[data-theme="dark"] {
    --bg-primary: #0b0f19;
    --bg-secondary: #161f30;
    --bg-tertiary: #1f293d;
    --border-color: #2a354f;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(22, 31, 48, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);
    --color-primary-light: rgba(16, 185, 129, 0.15);
}

/* Reset de estilos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Clases Útiles */
.hidden {
    display: none !important;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-danger {
    background-color: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background-color: var(--color-danger-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
}

.btn-success {
    background-color: var(--color-success);
    color: white;
}

.btn-success:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Header Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--color-primary), #0284c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.student-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    background-color: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Selector de Idiomas */
.lang-selector {
    display: flex;
    background-color: var(--bg-tertiary);
    padding: 3px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.lang-btn {
    border: none;
    background: transparent;
    padding: 5px 10px;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
}

.lang-btn.active {
    background-color: var(--bg-secondary);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

/* Toggler de modo oscuro */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--text-main);
    background-color: var(--bg-tertiary);
}

/* Botón disparador del carrito (Móvil) */
.cart-trigger {
    position: relative;
    border: 1px solid var(--border-color);
    background: transparent;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-trigger:hover {
    background-color: var(--bg-tertiary);
}

.cart-trigger .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: var(--color-danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    box-shadow: 0 2px 5px rgba(244, 63, 94, 0.4);
    animation: bounce 0.3s ease;
}

/* Main Tab Links Navigation */
.main-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.tab-link {
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.tab-link:hover {
    color: var(--text-main);
    background-color: var(--bg-tertiary);
}

.tab-link.active {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

/* Layout App (Dos Columnas) */
.app-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    max-width: 1440px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
}

.content-area {
    padding: 30px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* Filters & Search */
.filters-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-bar {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    box-shadow: var(--shadow-sm);
}

.search-bar:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-btn {
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-main);
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
}

.category-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.category-btn.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.sorting-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sorting-wrapper label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.custom-select {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-main);
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

/* Grilla de productos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.product-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: 15px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-card-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 80%;
    /* Aspect ratio 5:4 */
    overflow: hidden;
    border-radius: var(--radius-sm);
    background-color: var(--bg-tertiary);
}

.product-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.08);
}

.product-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-top: 12px;
    letter-spacing: 0.5px;
}

.product-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 4px 0 8px 0;
    color: var(--text-main);
}

.product-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-card-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
}

.product-card .add-to-cart-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-card .add-to-cart-btn:hover {
    background-color: var(--color-primary-hover);
    transform: scale(1.1);
}

.product-card .add-to-cart-btn svg {
    width: 18px;
    height: 18px;
}

/* Spinner */
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 50px auto;
    grid-column: 1 / -1;
}

/* Carrito Sidebar */
.cart-sidebar {
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    position: sticky;
    top: 61px;
}

.cart-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    font-size: 1.3rem;
}

.cart-close-mobile {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: none;
    /* Oculto en desktop */
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-empty-text {
    color: var(--text-muted);
    text-align: center;
    margin: auto 0;
    font-size: 0.95rem;
}

/* Item del Carrito */
.item-block {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-primary);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.cart-item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    background-color: var(--bg-tertiary);
}

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

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 700;
}

.cart-item-details {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-main);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background-color: var(--border-color);
}

.cart-item-qty {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 15px;
    text-align: center;
}

.cart-item-delete {
    background: transparent;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    margin-left: 5px;
}

.cart-item-delete:hover {
    color: var(--color-danger-hover);
}

/* Carrito Footer */
.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-primary);
}

.coupon-section {
    margin-bottom: 15px;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
}

.coupon-input-group input {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 0.85rem;
    outline: none;
}

.coupon-input-group input:focus {
    border-color: var(--color-primary);
}

.coupon-feedback {
    font-size: 0.75rem;
    margin-top: 4px;
    font-weight: 600;
}

.coupon-feedback.success {
    color: var(--color-success);
}

.coupon-feedback.error {
    color: var(--color-danger);
}

.cart-summary-totals {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.summary-line.discount {
    color: var(--color-danger);
}

.summary-line.total {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
}

.cart-actions-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cart-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
}

/* MODALES */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    display: none;
    /* Controlado por JS */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.visible {
    display: flex;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-tertiary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    z-index: 10;
}

.modal-close:hover {
    background-color: var(--border-color);
}

/* Modal Detalle de Producto */
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
}

.modal-image-wrapper {
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.modal-info {
    display: flex;
    flex-direction: column;
}

.detail-category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-primary);
    letter-spacing: 0.5px;
}

.detail-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 4px 0;
}

.detail-rating {
    display: flex;
    gap: 2px;
    color: var(--color-warning);
    margin-bottom: 12px;
}

.detail-price {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.nutrition-card {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 20px;
}

.nutrition-card h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nutri-progress-group {
    margin-bottom: 8px;
}

.nutri-progress-group:last-child {
    margin-bottom: 0;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.progress-bar-container {
    background-color: var(--border-color);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--color-primary);
    border-radius: 3px;
    transition: width 0.8s ease;
}

/* Creador de Ensaladas (Customizer) */
.customizer-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    align-items: start;
}

.customizer-config {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: -15px;
}

.custom-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.custom-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.size-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.size-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.size-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.size-card:hover {
    border-color: var(--color-primary);
}

.size-card.active {
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.size-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.size-price {
    font-weight: 800;
    color: var(--color-primary-hover);
}

.salad-fruits-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fruit-selector-item {
    display: grid;
    grid-template-columns: 80px 1fr 50px;
    align-items: center;
    gap: 15px;
}

.fruit-meta-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: capitalize;
}

.range-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-range {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    background: var(--bg-tertiary);
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.weight-display {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: right;
    color: var(--text-muted);
}

.toppings-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.topping-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-primary);
}

.topping-item input {
    accent-color: var(--color-primary);
}

/* Visualización de la Ensalada */
.customizer-preview {
    position: sticky;
    top: 80px;
}

.sticky-preview-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bowl-visualization {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.virtual-bowl {
    width: 180px;
    height: 110px;
    border-radius: 0 0 90px 90px;
    border: 4px solid var(--color-secondary);
    position: relative;
    overflow: hidden;
    background-color: transparent;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.05);
}

.bowl-rim {
    width: 100%;
    height: 8px;
    background-color: var(--color-secondary);
    position: absolute;
    top: 0;
    left: 0;
}

.bowl-fillings {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column-reverse;
}

.salad-layer {
    width: 100%;
    transition: height 0.3s ease;
}

.bowl-toppings-visual {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 20px;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.topping-visual-particle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: dropIn 0.3s ease forwards;
}

.bowl-glass {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.salad-nutrients-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.nutri-badge {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nutri-badge .n-val {
    font-size: 1rem;
    font-weight: 800;
}

.nutri-badge .n-unit {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.salad-itemized-list {
    min-height: 80px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    background-color: var(--bg-primary);
}

.salad-item-summary {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding: 4px 0;
}

.salad-item-summary:last-child {
    border: none;
}

.salad-total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
}

.salad-total-price .price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primary-hover);
}

/* Dashboard Vista */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.macro-summary {
    grid-column: 1 / -1;
}

.dashboard-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.dashboard-card h3 {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.macro-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.macro-item {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.macro-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.macro-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primary);
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Historial de Pedidos */
.history-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-order-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-meta-info {
    display: flex;
    flex-direction: column;
}

.order-id {
    font-weight: 700;
    font-size: 1rem;
}

.order-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.order-total {
    font-weight: 800;
    font-size: 1.15rem;
}

/* Formulario de Checkout */
.checkout-modal-width {
    max-width: 800px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-main);
    outline: none;
    font-family: var(--font-main);
}

.form-group input:focus {
    border-color: var(--color-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Visualización Tarjeta */
.card-js-wrapper {
    display: flex;
    justify-content: center;
    margin: 5px 0 15px 0;
    perspective: 800px;
}

.credit-card-preview {
    width: 280px;
    height: 160px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.credit-card-preview.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    padding: 20px;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #1e293b, #0f172a);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-face.front {
    /* Frontal */
}

.card-face.back {
    /* Trasero */
    transform: rotateY(180deg);
    padding: 0;
    justify-content: flex-start;
}

.chip {
    width: 32px;
    height: 24px;
    background-color: #ffd700;
    border-radius: 4px;
}

.card-number-label {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem;
    letter-spacing: 2px;
    text-align: center;
    margin: 10px 0;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-holder,
.card-expiration {
    display: flex;
    flex-direction: column;
}

.card-holder .label,
.card-expiration .label {
    font-size: 0.6rem;
    color: #94a3b8;
}

.name-display,
.expiry-display {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.magnetic-strip {
    background-color: #000;
    height: 35px;
    width: 100%;
    margin-top: 15px;
}

.signature-cvv {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.signature {
    background-color: #e2e8f0;
    height: 30px;
    width: 100%;
}

.cvv-display {
    color: #0f172a;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    font-weight: 700;
    text-align: right;
    background-color: white;
    padding: 3px 6px;
    border-radius: 3px;
    width: 40px;
    align-self: flex-end;
    margin-top: -33px;
    margin-right: 10px;
}

/* Checkout Resumen Pane */
.checkout-summary-pane {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkout-summary-pane h3 {
    font-size: 1.1rem;
}

.checkout-summary-items {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 15px;
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}

.checkout-summary-totals {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Factura Modal (Recibo) */
.receipt-modal-width {
    max-width: 600px;
}

.invoice-container {
    background-color: white;
    color: #333333;
    padding: 30px;
    border: 1px solid #e2e8f0;
    font-family: monospace;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
}

.company-details h2,
.invoice-meta h2 {
    font-size: 1.4rem;
    color: #111111;
}

.invoice-divider {
    border: none;
    border-top: 2px dashed #999999;
    margin: 20px 0;
}

.invoice-customer-details {
    margin-bottom: 20px;
}

.invoice-customer-details h3 {
    margin-bottom: 5px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.invoice-table th,
.invoice-table td {
    text-align: left;
    padding: 8px 4px;
    border-bottom: 1px solid #eeeeee;
}

.invoice-table th {
    font-weight: 700;
}

.invoice-totals-wrapper {
    display: flex;
    justify-content: flex-end;
}

.invoice-totals {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.invoice-totals h3 {
    font-size: 1.2rem;
    color: #111111;
    border-top: 1px dashed #666666;
    padding-top: 5px;
}

.invoice-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.8rem;
    color: #666666;
}

.receipt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Toasts flotantes */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.success {
    border-left: 4px solid var(--color-success);
}

.toast.error {
    border-left: 4px solid var(--color-danger);
}

.toast.warning {
    border-left: 4px solid var(--color-warning);
}

.toast.fade-out {
    animation: slideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ANIMACIONES */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(120%);
    }
}

@keyframes dropIn {
    from {
        transform: translateY(-40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        position: fixed;
        right: -380px;
        top: 0;
        width: 380px;
        height: 100vh;
        z-index: 1000;
        box-shadow: var(--shadow-lg);
        transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .cart-sidebar.open {
        right: 0;
    }

    .cart-close-mobile {
        display: block;
    }

    .cart-backdrop.visible {
        display: block;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }

    .student-info {
        display: none;
        /* Ocultar en móviles pequeños */
    }

    .content-area {
        padding: 15px;
    }

    .customizer-container,
    .checkout-grid,
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .checkout-summary-pane {
        order: -1;
        /* Mostrar resumen arriba en móvil */
    }

    .toppings-options {
        grid-template-columns: 1fr;
    }

    .customizer-preview {
        position: static;
    }

    .macro-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}