/* =========================================================
   ESTILOS PÚBLICOS - Storefront estilo Rappi / DiDi Food
   ========================================================= */

:root {
    --color-primario: #ff7700;
    --color-secundario: #333333;
    --bg-page: #f5f5f5;
    --bg-card: #ffffff;
    --bg-dark: #1a1a1a;
    --text-main: #222;
    --text-muted: #666;
    --text-light: #999;
    --border: #e5e5e5;
    --success: #16a34a;
    --danger: #dc2626;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow: 0 2px 8px rgba(0,0,0,.12);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.25);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--bg-page);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ======================= HEADER (STICKY) ======================= */
.header {
    background: linear-gradient(135deg, var(--color-secundario) 0%, #1e1e1e 100%);
    color: #fff;
    padding: 14px 16px 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    justify-content: center;
}
.header-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-welcome {
    text-align: center;
    color: #ffcc99;
    font-size: .85rem;
    margin-top: 8px;
    opacity: .9;
}

/* Botón menú hamburguesa */
.btn-menu {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.08);
    border: none;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: background .2s;
}
.btn-menu:hover { background: rgba(255,255,255,.18); }
.btn-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .3s;
}

/* Botón carrito en header */
.btn-cart-header {
    position: relative;
    width: 42px;
    height: 42px;
    background: var(--color-primario);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform .2s;
}
.btn-cart-header:hover { transform: scale(1.06); }
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc2626;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-secundario);
    transform: scale(0);
    transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.cart-badge.active { transform: scale(1); }

/* ======================= MENÚ LATERAL ======================= */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 82%;
    max-width: 320px;
    height: 100vh;   /* fallback */
    height: 100dvh;  /* dinámico móvil */
    background: #fff;
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.side-menu.open { transform: translateX(0); }
.side-menu-header {
    background: var(--color-secundario);
    color: #fff;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}
.side-menu-logo {
    width: 40px;
    height: 40px;
    background: #fff;
    padding: 3px;
    border-radius: 50%;
    object-fit: contain;
}
.side-menu-header span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-close-menu {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
}
.side-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.side-menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: .95rem;
    border-left: 3px solid transparent;
    transition: background .15s, border-color .15s;
}
.side-menu-link i {
    width: 22px;
    color: var(--color-primario);
    text-align: center;
}
.side-menu-link:hover {
    background: #f5f5f5;
    border-left-color: var(--color-primario);
}
.side-menu-count {
    margin-left: auto;
    background: #eee;
    color: #666;
    font-size: .75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.side-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}
.side-menu-overlay.active { opacity: 1; pointer-events: auto; }

/* ======================= CONTENIDO ======================= */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 16px 100px;
}
.category-section {
    margin-bottom: 32px;
    scroll-margin-top: 90px; /* Ajustado para header sticky */
}
.category-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 14px;
    padding-left: 4px;
    border-left: 4px solid var(--color-primario);
    padding-left: 12px;
}

/* Grid de productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform .18s, box-shadow .18s;
    position: relative;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.product-image {
    height: 160px;
    background: #f0f0f0;
    overflow: hidden;
    position: relative;
}
.product-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .3s;
}
.product-card:hover .product-image img { transform: scale(1.05); }
.product-image-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 2.5rem;
}
.badge-destacado {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--color-primario);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}
.product-info {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.25;
}
.product-description {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-footer {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}
.product-price { display: flex; flex-direction: column; gap: 2px; }
.price-main {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-primario);
}
.price-combo {
    font-size: .72rem;
    color: var(--text-muted);
    font-weight: 500;
}
.btn-add {
    background: var(--color-primario);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform .15s, background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255,119,0,.35);
}
.btn-add:hover { transform: scale(1.08); background: #e66a00; }
.btn-add:active { transform: scale(.95); }

/* ======================= MODAL ======================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 1500;
    display: none;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn .2s;
}
.modal.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
    background: #fff;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp .3s cubic-bezier(.16,1,.3,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 3;
    line-height: 1;
}
.modal-hero {
    height: 200px;
    background: #f0f0f0;
    position: relative;
    flex-shrink: 0;
}
.modal-hero img {
    width: 100%; height: 100%; object-fit: cover;
}
.modal-body {
    padding: 18px 18px 12px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}
.modal-body h2 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: var(--text-main);
}
.modal-desc {
    font-size: .88rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.4;
}
.modal-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.modal-section:last-child { border-bottom: none; }
.modal-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-hint {
    font-size: .7rem;
    font-weight: 500;
    color: var(--text-light);
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 8px;
    text-transform: uppercase;
}

/* Tiles de tipo (solo vs combo) */
.option-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.option-tile {
    cursor: pointer;
    position: relative;
}
.option-tile input { position: absolute; opacity: 0; }
.option-tile-inner {
    padding: 14px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all .2s;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.option-tile.selected .option-tile-inner {
    border-color: var(--color-primario);
    background: rgba(255,119,0,.08);
}
.option-title { font-weight: 700; color: var(--text-main); font-size: .95rem; }
.option-price { color: var(--color-primario); font-weight: 700; font-size: 1rem; }
.option-note { font-size: .7rem; color: var(--text-muted); margin-top: 2px; line-height: 1.2; }

/* Cantidad */
.qty-picker {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 30px;
    width: max-content;
}
.qty-picker button {
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    color: var(--color-primario);
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform .1s;
}
.qty-picker button:active { transform: scale(.9); }
.qty-picker input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}
.qty-picker input::-webkit-outer-spin-button,
.qty-picker input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Sección por unidad */
.unidad-block {
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
}
.unidad-title {
    font-weight: 700;
    font-size: .9rem;
    color: var(--color-primario);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.unidad-title i { font-size: .8rem; }
.unidad-field { margin-bottom: 10px; }
.unidad-field:last-child { margin-bottom: 0; }
.unidad-field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.unidad-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .88rem;
    resize: vertical;
    background: #fff;
}
.unidad-field textarea:focus {
    outline: none;
    border-color: var(--color-primario);
}
.sabor-select {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sabor-chip {
    padding: 6px 12px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-main);
    transition: all .15s;
}
.sabor-chip input { display: none; }
.sabor-chip.selected {
    background: var(--color-primario);
    color: #fff;
    border-color: var(--color-primario);
}

/* Chips de extras */
.chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip-extra {
    cursor: pointer;
    user-select: none;
}
.chip-extra input { display: none; }
.chip-extra-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f5f5f5;
    border: 1.5px solid transparent;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-main);
    transition: all .15s;
}
.chip-extra-label small {
    color: var(--color-primario);
    font-size: .75rem;
    font-weight: 700;
}
.chip-extra input:checked + .chip-extra-label {
    background: rgba(255,119,0,.15);
    border-color: var(--color-primario);
    color: var(--color-primario);
}

/* Bebidas adicionales con cantidad */
.bebidas-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bebida-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.bebida-info { display: flex; flex-direction: column; gap: 2px; }
.bebida-name { font-weight: 600; color: var(--text-main); font-size: .9rem; }
.bebida-price { color: var(--color-primario); font-weight: 700; font-size: .8rem; }
.bebida-qty { display: flex; align-items: center; gap: 6px; }
.bebida-qty button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--color-primario);
    background: #fff;
    color: var(--color-primario);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
}
.bebida-qty button:disabled { opacity: .35; cursor: not-allowed; }
.bebida-qty-val { min-width: 22px; text-align: center; font-weight: 700; }

/* Footer del modal */
.modal-footer {
    background: #fff;
    padding: 12px 16px calc(12px + var(--safe-bottom));
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.modal-total { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.modal-total span { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; }
.modal-total strong { font-size: 1.2rem; color: var(--text-main); }
.btn-add-cart {
    flex: 1;
    background: var(--color-primario);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(255,119,0,.4);
    transition: background .15s, transform .1s;
}
.btn-add-cart:hover { background: #e66a00; }
.btn-add-cart:active { transform: scale(.98); }

/* ======================= CARRITO ======================= */
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;   /* fallback */
    height: 100dvh;  /* dinámico: se ajusta cuando aparece/desaparece la barra de dirección en móvil */
    background: #fff;
    z-index: 1502;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.16,1,.3,1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
    background: var(--color-secundario);
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cart-header h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.cart-header button {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
}
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 0;  /* Crítico: sin esto el body puede empujar el footer fuera del viewport */
}
.cart-empty {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
    font-size: .95rem;
}
.cart-item {
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
}
.cart-item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}
.cart-item-name { font-weight: 700; color: var(--text-main); font-size: .92rem; }
.cart-item-tag {
    display: inline-block;
    font-size: .7rem;
    padding: 1px 8px;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 4px;
}
.cart-item-tag.combo { background: rgba(255,119,0,.15); color: var(--color-primario); }
.cart-item-tag.individual { background: #f0f0f0; color: var(--text-muted); }
.cart-item-price { font-weight: 700; color: var(--text-main); white-space: nowrap; }
.cart-item-details {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
}
.cart-item-details .detail-row { margin-bottom: 2px; }
.cart-item-details .detail-quitar { color: var(--danger); font-style: italic; }
.cart-item-details .detail-bebida { color: #2563eb; }
.cart-item-details .detail-extra { color: var(--success); }
.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}
.cart-item-actions .qty-picker {
    padding: 2px;
    gap: 2px;
}
.cart-item-actions .qty-picker button {
    width: 26px;
    height: 26px;
    font-size: 1rem;
}
.cart-item-actions .qty-picker input {
    width: 28px;
    font-size: .9rem;
}
.btn-remove {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: .8rem;
    padding: 4px 8px;
    border-radius: 6px;
}
.btn-remove:hover { background: rgba(220,38,38,.08); }

.cart-footer {
    padding: 14px 16px calc(14px + var(--safe-bottom));
    border-top: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 -4px 12px rgba(0,0,0,.06); /* sombra sutil para que se note el footer */
    flex-shrink: 0;                          /* nunca se comprime */
}
.cart-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: .92rem;
    color: var(--text-muted);
}
.cart-line.cart-total {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
}
.cart-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.cart-actions .btn-secondary { flex: 0 0 40%; }  /* Seguir: más pequeño */
.cart-actions .btn-primary   {
    flex: 1;
    font-size: 1rem;           /* botón principal más grande */
    padding: 14px;
    animation: pulse-btn 2s ease-in-out infinite; /* pulso sutil para llamar la atención */
}
@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 3px 8px rgba(255,119,0,.35); }
    50%      { box-shadow: 0 4px 16px rgba(255,119,0,.55); }
}
.btn-primary, .btn-secondary {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: transform .1s, background .15s;
}
.btn-primary {
    background: var(--color-primario);
    color: #fff;
    box-shadow: 0 3px 8px rgba(255,119,0,.35);
}
.btn-primary:hover { background: #e66a00; }
.btn-primary:active { transform: scale(.98); }
.btn-secondary {
    background: #f0f0f0;
    color: var(--text-main);
}
.btn-secondary:hover { background: #e5e5e5; }

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1501;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}
.cart-overlay.active { opacity: 1; pointer-events: auto; }

/* ======================= FAB CARRITO ======================= */
.fab-cart {
    position: fixed;
    bottom: calc(20px + var(--safe-bottom));
    right: 20px;
    background: var(--color-primario);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 20px 12px 16px;
    box-shadow: 0 6px 20px rgba(255,119,0,.5);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 900;
    font-size: .95rem;
    font-weight: 700;
    animation: pop-in .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop-in { from { transform: scale(0); } to { transform: scale(1); } }
.fab-cart:hover { background: #e66a00; }
.fab-cart[hidden] { display: none; }
.fab-cart i { font-size: 1.2rem; }
.fab-cart-count {
    background: #fff;
    color: var(--color-primario);
    font-size: .8rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 22px;
    text-align: center;
}
.fab-cart-total { font-size: .95rem; font-weight: 800; }

/* ======================= RESPONSIVE ======================= */
@media (max-width: 640px) {
    .header-title { font-size: 1rem; }
    .header-logo { width: 38px; height: 38px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .product-image { height: 130px; }
    .product-info { padding: 10px 12px 12px; }
    .product-name { font-size: .92rem; }
    .product-description { font-size: .75rem; -webkit-line-clamp: 2; }
    .price-main { font-size: .95rem; }
    .price-combo { font-size: .68rem; }
    .btn-add { width: 34px; height: 34px; font-size: 1rem; }
    .modal-content { max-height: 96vh; }
    .modal-hero { height: 170px; }
    .category-title { font-size: 1.1rem; }
    .main-content { padding: 12px 12px 90px; }
}

/* Pantallas grandes: modal centrado */
@media (min-width: 640px) {
    .modal { align-items: center; }
    .modal-content { border-radius: 20px; max-height: 90vh; }
}

/* ======================= TOAST (soft prompt / abandono) ======================= */
.app-toast {
    position: fixed;
    left: 50%;
    bottom: calc(20px + var(--safe-bottom));
    transform: translateX(-50%) translateY(20px);
    background: #fff;
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 400px;
    width: calc(100% - 24px);
    z-index: 2000;
    opacity: 0;
    transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .3s;
    border: 1px solid var(--border);
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-icon {
    font-size: 1.7rem;
    line-height: 1;
    flex-shrink: 0;
    padding-top: 2px;
}
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-weight: 700; font-size: .95rem; margin-bottom: 3px; color: var(--text-main); }
.toast-text  { font-size: .82rem; color: var(--text-muted); line-height: 1.35; }
.toast-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    justify-content: flex-end;
}
.toast-btn-primary, .toast-btn-secondary {
    padding: 7px 14px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    transition: transform .1s, background .15s;
}
.toast-btn-primary {
    background: var(--color-primario);
    color: #fff;
}
.toast-btn-primary:hover { background: #e66a00; }
.toast-btn-primary:active { transform: scale(.97); }
.toast-btn-secondary {
    background: #f0f0f0;
    color: var(--text-muted);
}
.toast-btn-secondary:hover { background: #e5e5e5; }
.toast-close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}
.toast-close:hover { color: var(--text-main); }

@media (max-width: 480px) {
    .app-toast { padding: 12px; }
    .toast-title { font-size: .9rem; }
    .toast-text { font-size: .78rem; }
}
