/* ==========================================================
   FRESCO — Catálogo visual + lista de pedido
   Paleta, tipografía y estética basadas en el mockup aprobado
   ========================================================== */

/* --- Variables de diseño (tokens) --- */
:root {
    --bg: #fff;
    --surface: #FBF7F1;
    --white: #fff;
    --primary: #14261C;
    --accent: #2F7A4D;
    --accent-deep: #1E5637;
    --placeholder-bg: #F1EDE5;
    --soft-green: #EFF4EC;

    --text-primary: #14261C;
    --text-secondary: rgba(20, 38, 28, 0.62);
    --text-tertiary: rgba(20, 38, 28, 0.55);
    --text-muted: rgba(20, 38, 28, 0.45);
    --text-light: rgba(20, 38, 28, 0.35);
    --text-inverse: #FBF7F1;

    --border: rgba(20, 38, 28, 0.10);
    --border-md: rgba(20, 38, 28, 0.14);
    --border-strong: rgba(20, 38, 28, 0.16);

    --font-display: 'Instrument Serif', serif;
    --font-body: 'Hanken Grotesk', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 22px;
}


/* --- Reset y base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100dvh;
    overflow-x: hidden;
}

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

input, textarea, select {
    font-family: var(--font-body);
    outline: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Sin scrollbar visible pero funcional */
.no-scroll::-webkit-scrollbar { display: none; }
.no-scroll { scrollbar-width: none; }


/* --- Pantallas (gestión de visibilidad) --- */
.screen {
    display: none;
    min-height: 100dvh;
}
.screen.active {
    display: flex;
    flex-direction: column;
}


/* ==========================================================
   ENCABEZADO
   ========================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(237, 231, 221, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--primary);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font: 600 16px var(--font-body);
}

.brand-info {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-name {
    font: 600 14px var(--font-body);
    letter-spacing: 0.13em;
    color: var(--text-primary);
}

.brand-tagline {
    font: 400 10px var(--font-mono);
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Botón "Mi pedido" en el header */
.btn-cart-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid var(--border-md);
    border-radius: 18px;
    background: var(--white);
    font: 600 12px var(--font-body);
    color: var(--text-primary);
}

.cart-icon { font-size: 14px; }

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--white);
    font: 600 11px var(--font-body);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    animation: bump 0.3s ease;
}


/* ==========================================================
   HERO / SALUDO
   ========================================================== */
.catalog-main {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px;
}

.hero {
    padding: 22px 20px 4px;
}

.hero-greeting {
    font: 500 13px var(--font-body);
    color: var(--text-tertiary);
}

.hero-title {
    font: 400 32px/1.06 var(--font-display);
    color: var(--text-primary);
    margin: 6px 0 8px;
}

.hero-subtitle {
    font: 400 14px/1.45 var(--font-body);
    color: var(--text-secondary);
    max-width: 300px;
}


/* ==========================================================
   CATEGORÍAS (pills)
   ========================================================== */
.categories {
    display: flex;
    gap: 8px;
    padding: 20px 20px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.categories::-webkit-scrollbar { display: none; }
.categories { scrollbar-width: none; }

.cat-pill {
    flex: none;
    padding: 9px 16px;
    border-radius: 17px;
    border: 1px solid var(--border-md);
    background: var(--white);
    font: 500 13px var(--font-body);
    color: var(--text-primary);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cat-pill.active {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary);
}


/* ==========================================================
   ENCABEZADO DE SECCIÓN (título + conteo)
   ========================================================== */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 2px 20px 12px;
}

.section-title {
    font: 600 13px var(--font-body);
    color: var(--text-primary);
}

.section-count {
    font: 400 11.5px var(--font-mono);
    color: var(--text-muted);
}


/* ==========================================================
   GRILLA DE PRODUCTOS
   ========================================================== */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 20px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease;
}

/* Imagen del producto */
.product-image {
    position: relative;
    height: 130px;
    background: var(--placeholder-bg);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder cuando no hay imagen: muestra inicial del producto */
.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 400 42px var(--font-display);
    color: var(--text-light);
    background: var(--placeholder-bg);
}

/* Etiqueta de unidad sobre la imagen */
.unit-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 12px;
    background: rgba(251, 247, 241, 0.92);
    font: 500 10.5px var(--font-mono);
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

/* Overlay para productos agotados */
.out-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(20,38,28,0.05), rgba(20,38,28,0.32));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
    pointer-events: none;
}

.out-label {
    font: 600 10.5px var(--font-mono);
    letter-spacing: 0.06em;
    padding: 5px 9px;
    border-radius: 14px;
    background: var(--primary);
    color: var(--text-inverse);
}

/* Check de "agregado" sobre la imagen */
.check-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pop 0.22s ease;
}

/* Información del producto */
.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.product-name {
    font: 600 14px/1.2 var(--font-body);
    color: var(--text-primary);
}

.product-actions {
    margin-top: auto;
}

/* Botón "Agregar" */
.btn-add {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-radius: 14px;
    background: var(--primary);
    color: var(--text-inverse);
    font: 600 13px var(--font-body);
    transition: background 0.18s ease;
}
.btn-add:active {
    background: var(--accent-deep);
}

/* Control de cantidad (stepper) */
.qty-stepper {
    display: flex;
    align-items: center;
    background: var(--primary);
    border-radius: 14px;
    overflow: hidden;
    animation: pop 0.22s ease;
}

.btn-step {
    width: 40px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font: 600 18px var(--font-body);
    transition: color 0.15s;
}
.btn-step:active {
    color: var(--white);
}

.qty-value {
    flex: 1;
    text-align: center;
    font: 600 13px var(--font-body);
    color: var(--white);
}

/* Botón de indicación por producto */
.btn-note-product {
    width: 100%;
    margin-top: 6px;
    padding: 6px 0;
    font: 500 11.5px var(--font-body);
    color: var(--text-tertiary);
    text-align: center;
}
.btn-note-product.has-note {
    color: var(--accent);
}

/* Botón "Avísame" para productos agotados */
.btn-notify {
    width: 100%;
    padding: 12px 0;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: transparent;
    font: 600 12.5px var(--font-body);
    color: var(--text-tertiary);
    transition: all 0.2s;
}

/* Producto no disponible: tarjeta con opacidad reducida */
.product-card.unavailable .product-info {
    opacity: 0.7;
}

/* Texto informativo al pie del catálogo */
.catalog-footer-text {
    padding: 26px 20px 8px;
    text-align: center;
    font: 400 11.5px/1.5 var(--font-body);
    color: var(--text-muted);
}

/* Estado vacío */
.empty-state {
    grid-column: 1 / -1;
    padding: 44px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    text-align: center;
}

.empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: var(--placeholder-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.empty-title {
    font: 400 21px var(--font-display);
    color: var(--text-primary);
}

.empty-text {
    font: 400 13px/1.5 var(--font-body);
    color: var(--text-tertiary);
    margin-top: 7px;
}


/* ==========================================================
   BARRA FLOTANTE DEL PEDIDO (abajo)
   ========================================================== */
.cart-bar {
    position: fixed;
    bottom: 22px;
    left: 16px;
    right: 16px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    background: var(--primary);
    box-shadow: 0 16px 34px -12px rgba(20, 38, 28, 0.65);
    animation: rise 0.3s ease;
}

.cart-bar-icon {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: 15px;
}

.cart-bar-icon .cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
}

.cart-bar-text {
    flex: 1;
}

.cart-bar-title {
    display: block;
    font: 600 14px var(--font-body);
    color: var(--text-inverse);
}

.cart-bar-count {
    display: block;
    font: 400 11.5px var(--font-mono);
    color: rgba(251, 247, 241, 0.62);
    margin-top: 2px;
}

.cart-bar-cta {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.18);
    font: 600 12px var(--font-body);
    color: var(--text-inverse);
}


/* ==========================================================
   OVERLAYS Y BOTTOM SHEETS
   ========================================================== */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 38, 28, 0.42);
    animation: fadein 0.2s ease;
}

.sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    animation: sheet 0.3s cubic-bezier(0.22, 0.7, 0.24, 1);
    display: flex;
    flex-direction: column;
}

.sheet-handle {
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-strong);
    margin: 14px auto 0;
}

/* Carrito (bottom sheet) */
.cart-sheet {
    max-height: 82vh;
}

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

.cart-header-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.cart-title {
    font: 400 24px var(--font-display);
    color: var(--text-primary);
}

.cart-count-label {
    font: 400 11.5px var(--font-mono);
    color: var(--text-muted);
}

.btn-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(20, 38, 28, 0.07);
    color: var(--text-primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 6px 20px 8px;
}
.cart-items::-webkit-scrollbar { display: none; }
.cart-items { scrollbar-width: none; }

/* Item individual en el carrito */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(20, 38, 28, 0.07);
}

.cart-item-image {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--soft-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image .item-letter {
    font: 500 18px var(--font-display);
    color: var(--text-muted);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font: 600 14px var(--font-body);
    color: var(--text-primary);
}

.cart-item-unit {
    font: 400 11.5px var(--font-mono);
    color: var(--text-muted);
    margin-top: 2px;
}

.cart-item-note-btn {
    font: 400 11px var(--font-body);
    color: var(--text-tertiary);
    margin-top: 3px;
    padding: 0;
}
.cart-item-note-btn.has-note {
    color: var(--accent);
}

/* Mini stepper en el carrito */
.cart-item-stepper {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--placeholder-bg);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.cart-item-stepper button {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font: 600 16px var(--font-body);
    color: var(--text-primary);
}

.cart-item-stepper span {
    min-width: 38px;
    text-align: center;
    font: 600 12.5px var(--font-body);
    color: var(--text-primary);
}

.cart-item-delete {
    flex: none;
    width: 28px;
    height: 28px;
    font-size: 14px;
    color: var(--text-light);
}

.cart-footer {
    flex: none;
    padding: 14px 20px 22px;
    border-top: 1px solid var(--border);
    background: var(--white);
}

/* Carrito vacío */
.cart-empty {
    padding: 44px 10px 40px;
    text-align: center;
}

.cart-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: var(--placeholder-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.cart-empty-title {
    font: 400 21px var(--font-display);
    color: var(--text-primary);
}

.cart-empty-text {
    font: 400 13px/1.5 var(--font-body);
    color: var(--text-tertiary);
    margin-top: 7px;
    max-width: 230px;
    margin-left: auto;
    margin-right: auto;
}

/* Nota (bottom sheet) */
.note-sheet {
    padding: 0 20px 24px;
}

.note-label {
    font: 400 11.5px var(--font-mono);
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 16px;
}

.note-product-name {
    font: 400 26px/1.1 var(--font-display);
    color: var(--text-primary);
    margin: 4px 0 14px;
}

.note-textarea {
    width: 100%;
    min-height: 78px;
    padding: 13px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--white);
    font: 400 13.5px/1.45 var(--font-body);
    color: var(--text-primary);
    resize: none;
}

.note-actions {
    display: flex;
    gap: 9px;
    margin-top: 13px;
}


/* ==========================================================
   BOTONES REUTILIZABLES
   ========================================================== */
.btn-primary {
    width: 100%;
    padding: 16px 0;
    border: none;
    border-radius: 18px;
    background: var(--primary);
    color: var(--text-inverse);
    font: 600 15px var(--font-body);
    transition: background 0.18s;
}
.btn-primary:active {
    background: var(--accent-deep);
}

.btn-outline {
    flex: none;
    padding: 14px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: transparent;
    font: 600 13px var(--font-body);
    color: var(--text-tertiary);
}

.btn-link {
    width: 100%;
    margin-top: 8px;
    padding: 10px 0;
    font: 600 13px var(--font-body);
    color: var(--text-tertiary);
    text-align: center;
}


/* ==========================================================
   PANTALLA DE REVISIÓN
   ========================================================== */
.review-header {
    position: sticky;
    top: 0;
    z-index: 90;
    flex: none;
    padding: 16px 20px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.btn-back {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(20, 38, 28, 0.07);
    font-size: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-header-title {
    font: 600 13.5px var(--font-body);
    color: var(--text-primary);
}

.review-main {
    flex: 1;
    overflow-y: auto;
    padding: 4px 20px 20px;
    background: var(--surface);
}

.review-title {
    font: 400 30px/1.1 var(--font-display);
    color: var(--text-primary);
    margin: 2px 0 6px;
}

.review-subtitle {
    font: 400 13.5px/1.45 var(--font-body);
    color: var(--text-secondary);
    margin-bottom: 18px;
}

/* Tarjeta de resumen de productos */
.review-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 4px 16px;
}

.review-table-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 0 10px;
    border-bottom: 1px solid var(--border);
    font: 500 10.5px var(--font-mono);
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

/* Item en revisión */
.review-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(20, 38, 28, 0.07);
}

.review-item-image {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--soft-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-item-image .item-letter {
    font: 500 18px var(--font-display);
    color: var(--text-muted);
}

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

.review-item-name {
    font: 600 14px var(--font-body);
    color: var(--text-primary);
}

.review-item-unit {
    font: 400 11.5px var(--font-mono);
    color: var(--text-muted);
    margin-top: 2px;
}

.review-item-note {
    font: 400 11px var(--font-body);
    color: var(--accent);
    margin-top: 3px;
}

.review-item-qty {
    font: 600 14px var(--font-body);
    color: var(--text-primary);
}

.review-summary {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 15px 0 16px;
}

.review-summary-label {
    font: 600 14px var(--font-body);
    color: var(--text-primary);
}

.review-summary-count {
    font: 400 20px var(--font-display);
    color: var(--text-primary);
}

/* Secciones del formulario de revisión */
.form-section-title {
    font: 600 12.5px var(--font-body);
    color: var(--text-primary);
    margin: 22px 0 9px;
}

.form-textarea {
    width: 100%;
    min-height: 72px;
    padding: 13px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--white);
    font: 400 13.5px/1.45 var(--font-body);
    color: var(--text-primary);
    resize: none;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--white);
    font: 500 14px var(--font-body);
    color: var(--text-primary);
}
.form-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}
.form-input.error {
    border-color: #C2562F;
}

/* Selector "¿Cuándo lo necesitas?" */
.when-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.when-pill {
    padding: 11px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-md);
    background: var(--white);
    font: 500 13px var(--font-body);
    color: var(--text-primary);
    transition: all 0.2s;
}

.when-pill.active {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary);
}

/* Caja informativa */
.info-box {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--soft-green);
    font: 400 13px/1.5 var(--font-body);
    color: var(--text-secondary);
}

/* Pie fijo de revisión */
.review-footer {
    flex: none;
    padding: 14px 20px 24px;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.btn-send {
    width: 100%;
    padding: 18px 0;
    border: none;
    border-radius: 18px;
    background: var(--primary);
    color: var(--text-inverse);
    font: 600 16px var(--font-body);
    transition: background 0.18s;
}
.btn-send:active {
    background: var(--accent-deep);
}
.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.review-footer-hint {
    text-align: center;
    margin-top: 10px;
    font: 400 11.5px var(--font-body);
    color: var(--text-muted);
}


/* ==========================================================
   PANTALLA DE CONFIRMACIÓN
   ========================================================== */
#screen-confirmation {
    background: var(--surface);
}

.confirmation-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 26px;
    text-align: center;
}

.confirmation-check {
    position: relative;
    width: 78px;
    height: 78px;
    margin-bottom: 24px;
}

.check-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--accent);
    animation: ring 0.8s ease forwards;
}

.check-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pop 0.4s ease 0.15s both;
}

.confirmation-title {
    font: 400 32px/1.1 var(--font-display);
    color: var(--text-primary);
}

.confirmation-text {
    font: 400 14px/1.5 var(--font-body);
    color: var(--text-secondary);
    margin: 12px auto 0;
    max-width: 274px;
}

.confirmation-card {
    margin-top: 24px;
    padding: 14px 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    width: 100%;
    max-width: 290px;
    text-align: left;
}

.confirmation-meta {
    display: flex;
    justify-content: space-between;
    font: 400 11.5px var(--font-mono);
    color: var(--text-muted);
}

.confirmation-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 9px;
}

.confirmation-summary span:first-child {
    font: 600 13.5px var(--font-body);
    color: var(--text-primary);
}

.status-tag {
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--soft-green);
    font: 600 11px var(--font-mono);
    color: var(--accent);
}

.confirmation-btn {
    margin-top: 28px;
    max-width: 290px;
}


/* ==========================================================
   TOAST DE NOTIFICACIONES
   ========================================================== */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    padding: 12px 20px;
    border-radius: 14px;
    background: var(--primary);
    color: var(--text-inverse);
    font: 500 13px var(--font-body);
    box-shadow: 0 8px 24px rgba(20, 38, 28, 0.3);
    animation: rise 0.3s ease;
    white-space: nowrap;
}


/* ==========================================================
   ANIMACIONES
   ========================================================== */
@keyframes bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.14); }
    100% { transform: scale(1); }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes sheet {
    from { transform: translateY(102%); }
    to   { transform: translateY(0); }
}

@keyframes pop {
    0%   { transform: scale(0.6); opacity: 0; }
    60%  { transform: scale(1.06); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes ring {
    from { transform: scale(0.7); opacity: 0.55; }
    to   { transform: scale(1.5); opacity: 0; }
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* Tablets y pantallas medianas */
@media (min-width: 641px) {
    .catalog-main,
    .review-main {
        max-width: 640px;
        margin: 0 auto;
    }

    .header {
        padding: 14px 32px;
    }

    .cart-bar {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: calc(100% - 32px);
        max-width: 600px;
    }

    .product-image {
        height: 160px;
    }

    .sheet {
        max-width: 480px;
        margin: 0 auto;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    @keyframes sheet {
        from { transform: translate(-50%, 102%); }
        to   { transform: translate(-50%, 0); }
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .catalog-main,
    .review-main {
        max-width: 800px;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .product-image {
        height: 180px;
    }

    .hero-title {
        font-size: 38px;
    }

    .cart-bar {
        max-width: 700px;
    }
}

/* Pantallas muy pequeñas (320px) */
@media (max-width: 359px) {
    .hero-title {
        font-size: 28px;
    }

    .product-grid {
        gap: 8px;
        padding: 0 12px;
    }

    .product-image {
        height: 110px;
    }

    .product-name {
        font-size: 13px;
    }

    .categories {
        padding: 16px 12px 12px;
    }

    .hero {
        padding: 18px 12px 4px;
    }
}
