/* =====================================================
   MENU DIGITAL - Base CSS v2
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

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

:root {
    --color-primary:    #e63946;
    --color-secondary:  #f4a261;
    --color-primary-dk: #c1121f;
    --color-bg:         #f7f3ef;
    --color-surface:    #ffffff;
    --color-text:       #1a1a1a;
    --color-muted:      #6e6e6e;
    --color-border:     #e8e2db;
    --color-wa:         #25d366;
    --radius-sm:        8px;
    --radius:           16px;
    --radius-lg:        24px;
    --shadow-sm:        0 1px 4px rgba(0,0,0,.06);
    --shadow:           0 4px 20px rgba(0,0,0,.08);
    --shadow-lg:        0 12px 40px rgba(0,0,0,.14);
    --transition:       0.22s ease;
    --max-w:            1200px;
    --font-body:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display:     'Playfair Display', Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── HEADER ── */
.site-header {
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 0 var(--color-border), 0 4px 16px rgba(0,0,0,.04);
}
.header-inner {
    display: flex; align-items: center;
    justify-content: space-between;
    height: 64px; gap: 1rem;
}
.brand {
    display: flex; align-items: center; gap: .65rem;
    font-weight: 800; font-size: 1.15rem; letter-spacing: -.3px;
}
.brand-logo {
    height: 42px; width: 42px; object-fit: cover;
    border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.brand-name { color: var(--color-primary); }
.header-nav { display: flex; gap: .3rem; align-items: center; }
.nav-link {
    display: flex; align-items: center; gap: .3rem;
    padding: .45rem .9rem; border-radius: 10px;
    font-size: .88rem; font-weight: 500; color: var(--color-muted);
    transition: all var(--transition);
}
.nav-link:hover { background: #f0ebe4; color: var(--color-text); }
.cart-link { position: relative; }
.cart-badge {
    position: absolute; top: -5px; right: -5px;
    background: var(--color-primary); color: #fff;
    border-radius: 50%; width: 20px; height: 20px;
    font-size: .68rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff; box-shadow: 0 2px 6px rgba(230,57,70,.4);
}

/* ── MAIN / FOOTER ── */
.site-main { flex: 1; }
.site-footer {
    background: #111; color: #999;
    padding: 2rem 0; font-size: .85rem;
}
.footer-inner {
    display: flex; flex-wrap: wrap; gap: 1.2rem;
    justify-content: space-between; align-items: center;
}
.footer-info p { margin-bottom: .3rem; line-height: 1.5; }
.footer-social { display: flex; gap: .75rem; flex-wrap: wrap; }
.social-link {
    display: inline-flex; align-items: center; gap: .35rem;
    color: #777; padding: .3rem .7rem;
    border: 1px solid #2a2a2a; border-radius: 20px;
    transition: all var(--transition); font-size: .82rem;
}
.social-link:hover { color: #fff; border-color: #555; background: #1e1e1e; }
.footer-copy {
    color: #444; font-size: .78rem; width: 100%;
    text-align: center; padding-top: 1rem;
    border-top: 1px solid #1e1e1e; margin-top: .5rem;
}

/* ── BOTONES ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .4rem; padding: .6rem 1.3rem;
    border-radius: 10px; font-size: .92rem; font-weight: 600;
    transition: all var(--transition); cursor: pointer;
    border: 2px solid transparent; letter-spacing: -.1px;
}
.btn-primary {
    background: var(--color-primary); color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 14px rgba(230,57,70,.3);
}
.btn-primary:hover {
    background: var(--color-primary-dk); border-color: var(--color-primary-dk);
    box-shadow: 0 6px 20px rgba(230,57,70,.4); transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline { border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-ghost { color: var(--color-muted); }
.btn-ghost:hover { background: #f0ebe4; color: var(--color-text); }
.btn-whatsapp {
    background: var(--color-wa); color: #fff;
    border-color: var(--color-wa); font-size: 1rem;
    box-shadow: 0 4px 14px rgba(37,211,102,.3);
}
.btn-whatsapp:hover {
    background: #1ebe5a; border-color: #1ebe5a;
    box-shadow: 0 6px 20px rgba(37,211,102,.4); transform: translateY(-1px);
}
.btn-sm { padding: .32rem .75rem; font-size: .8rem; border-radius: 7px; }
.btn-grande { padding: .8rem 1.6rem; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.mt-1 { margin-top: .75rem; }

/* ── BADGES ── */
.badge-oferta {
    background: var(--color-primary); color: #fff;
    font-size: .65rem; font-weight: 800; padding: .22rem .55rem;
    border-radius: 6px; letter-spacing: .8px; text-transform: uppercase;
    position: absolute; top: .6rem; left: .6rem;
    box-shadow: 0 2px 8px rgba(230,57,70,.45);
}
.badge-grande { font-size: .8rem; padding: .3rem .9rem; border-radius: 8px; }

/* ── PRECIOS ── */
.precio-original { color: #bbb; text-decoration: line-through; font-size: .85rem; margin-right: .25rem; }
.precio-actual { color: var(--color-primary); font-weight: 700; font-size: 1.05rem; }
.precio-actual.grande { font-size: 1.6rem; font-weight: 800; }

/* ── HERO ── */
.hero-negocio {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #fff; padding: 2.5rem 0 4rem; position: relative; overflow: hidden;
}
.hero-negocio::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,.07) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,.05) 0%, transparent 40%);
    pointer-events: none;
}
.hero-negocio::after {
    content: '';
    position: absolute; bottom: -1px; left: 0; right: 0; height: 48px;
    background: var(--color-bg);
    clip-path: ellipse(60% 100% at 50% 100%);
}
.hero-content {
    display: flex; align-items: center; gap: 1.75rem;
    flex-wrap: wrap; position: relative; z-index: 1;
}
.hero-logo {
    width: 92px; height: 92px; border-radius: 20px; object-fit: cover;
    border: 3px solid rgba(255,255,255,.3);
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.hero-placeholder {
    font-size: 3.5rem; width: 92px; height: 92px;
    background: rgba(255,255,255,.15); border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
}
.hero-text { flex: 1; min-width: 200px; }
.hero-nombre {
    font-family: var(--font-display);
    font-size: 2.1rem; margin-bottom: .35rem;
    text-shadow: 0 2px 10px rgba(0,0,0,.15); letter-spacing: -.3px;
}
.hero-desc { opacity: .92; font-size: .95rem; max-width: 520px; margin-bottom: .5rem; }
.hero-horario {
    display: inline-flex; align-items: center; gap: .4rem;
    opacity: .9; font-size: .84rem;
    background: rgba(0,0,0,.15); padding: .3rem .8rem;
    border-radius: 20px; backdrop-filter: blur(6px);
}

/* ── CATEGORIAS NAV ── */
.categoria-nav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: .7rem 0; position: sticky;
    top: 64px; z-index: 90;
    overflow-x: auto; scrollbar-width: none;
}
.categoria-nav::-webkit-scrollbar { display: none; }
.categoria-nav .container { display: flex; gap: .4rem; flex-wrap: nowrap; }
.cat-btn {
    padding: .38rem 1rem; border-radius: 20px;
    font-size: .83rem; font-weight: 600; white-space: nowrap;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface); color: var(--color-muted);
    transition: all var(--transition);
}
.cat-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: #fff5f5; }
.cat-btn.active {
    background: var(--color-primary); color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 2px 10px rgba(230,57,70,.25);
}

/* ── SECCION PRODUCTOS ── */
.productos-section { padding: 1.5rem 0 2.5rem; }
.categoria-grupo { margin-bottom: 2.25rem; }
.categoria-titulo {
    font-family: var(--font-display);
    font-size: 1.4rem; font-weight: 700;
    margin: 2rem 0 1.1rem;
    display: flex; align-items: center; gap: .75rem;
}
.categoria-titulo::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(to right, var(--color-border), transparent);
}
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
    gap: 1.25rem;
}

/* ── TARJETA PRODUCTO ── */
.producto-card {
    background: var(--color-surface);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex; flex-direction: column;
}
.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.card-img-wrap {
    position: relative; display: block;
    height: 190px; overflow: hidden; background: #f0ebe4;
}
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.producto-card:hover .card-img { transform: scale(1.07); }
.card-img-placeholder {
    height: 100%;
    background: linear-gradient(135deg, #f5ede4 0%, #ede5db 100%);
    display: flex; align-items: center; justify-content: center; font-size: 3.5rem;
}
.card-body {
    padding: 1rem 1.1rem 1.1rem;
    flex: 1; display: flex; flex-direction: column;
}
.card-nombre {
    font-size: 1rem; font-weight: 700;
    margin-bottom: .3rem; line-height: 1.3; letter-spacing: -.2px;
}
.card-nombre a { transition: color var(--transition); }
.card-nombre a:hover { color: var(--color-primary); }
.card-desc {
    font-size: .82rem; color: var(--color-muted);
    margin-bottom: .85rem; line-height: 1.45; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
    display: flex; align-items: center;
    justify-content: space-between;
    gap: .5rem; flex-wrap: wrap; margin-top: auto;
}
.precio-wrap { display: flex; align-items: baseline; gap: .3rem; flex-wrap: wrap; }

/* ── DETALLE PRODUCTO ── */
.producto-detalle { padding: 1.75rem 0 3rem; }
.breadcrumb {
    font-size: .82rem; color: var(--color-muted);
    margin-bottom: 1.75rem;
    display: flex; align-items: center; gap: .4rem;
}
.breadcrumb a:hover { color: var(--color-primary); }
.detalle-grid {
    display: grid; grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem; align-items: start;
}
.detalle-galeria { position: relative; }
.detalle-nombre {
    font-family: var(--font-display);
    font-size: 1.85rem; line-height: 1.2;
    margin-bottom: .6rem; letter-spacing: -.3px;
}
.detalle-desc { color: var(--color-muted); margin-bottom: 1.25rem; font-size: .95rem; line-height: 1.65; }
.detalle-precio {
    display: flex; align-items: baseline; gap: .6rem;
    margin-bottom: 1.75rem; padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.detalle-total {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fff5f5 0%, #fff9f5 100%);
    border: 1.5px solid #ffd5d5; border-radius: var(--radius);
    font-size: 1.05rem; margin: 1.25rem 0;
}
#precio-dinamico { color: var(--color-primary); font-size: 1.4rem; font-weight: 800; }

.opcion-grupo { margin-bottom: 1.4rem; }
.opcion-titulo {
    font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .7px;
    color: var(--color-muted); margin-bottom: .65rem;
}
.opciones-list { display: flex; flex-direction: column; gap: .45rem; }
.opcion-item {
    display: flex; align-items: center; gap: .65rem;
    padding: .6rem .9rem;
    border: 1.5px solid var(--color-border);
    border-radius: 10px; cursor: pointer;
    transition: all var(--transition); background: var(--color-surface);
}
.opcion-item:hover { border-color: #ffb3ba; background: #fffafa; }
.opcion-item:has(input:checked) {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #fff5f5, #fffaf7);
    box-shadow: 0 0 0 3px rgba(230,57,70,.08);
}
.opcion-label { display: flex; justify-content: space-between; flex: 1; align-items: center; }
.opcion-nombre { font-size: .9rem; font-weight: 500; }
.opcion-precio { font-size: .85rem; color: var(--color-primary); font-weight: 700; }
.form-detalle { display: flex; flex-direction: column; gap: .6rem; }

/* ── SLIDER ── */
.slider {
    position: relative; border-radius: var(--radius);
    overflow: hidden; aspect-ratio: 4/3; background: #f0ebe4;
    box-shadow: var(--shadow);
}
.slider-track { height: 100%; }
.slide { display: none; height: 100%; }
.slide.active { display: flex; align-items: center; justify-content: center; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-placeholder { font-size: 5rem; }
.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.88); color: var(--color-text);
    border-radius: 50%; width: 40px; height: 40px; font-size: 1.3rem;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition); z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,.15); backdrop-filter: blur(4px);
}
.slider-btn:hover {
    background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.2);
    transform: translateY(-50%) scale(1.08);
}
.slider-btn.prev { left: .75rem; }
.slider-btn.next { right: .75rem; }
.slider-dots {
    position: absolute; bottom: .75rem;
    left: 50%; transform: translateX(-50%);
    display: flex; gap: .4rem;
    background: rgba(0,0,0,.25); padding: .3rem .5rem;
    border-radius: 20px; backdrop-filter: blur(4px);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: all var(--transition); }
.dot.active { background: #fff; transform: scale(1.3); }
.no-foto {
    height: 320px;
    background: linear-gradient(135deg, #f5ede4 0%, #ede5db 100%);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center; font-size: 5rem;
}

/* ── CARRITO ── */
.carrito-section { padding: 2rem 0 3rem; }
.page-titulo {
    font-family: var(--font-display);
    font-size: 1.8rem; margin-bottom: 1.75rem; letter-spacing: -.3px;
}
.carrito-vacio { text-align: center; padding: 4rem 1rem; color: var(--color-muted); }
.vacio-icon { font-size: 4.5rem; margin-bottom: 1rem; opacity: .4; }
.carrito-grid { display: grid; grid-template-columns: 1fr 360px; gap: 1.75rem; align-items: start; }
.carrito-items { display: flex; flex-direction: column; gap: .9rem; }
.carrito-item {
    background: var(--color-surface); border-radius: var(--radius);
    padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    display: flex; justify-content: space-between;
    align-items: flex-start; gap: 1rem; flex-wrap: wrap;
    transition: box-shadow var(--transition);
}
.carrito-item:hover { box-shadow: var(--shadow); }
.item-info { flex: 1; min-width: 150px; }
.item-nombre { font-weight: 700; margin-bottom: .25rem; letter-spacing: -.1px; }
.item-variacion, .item-topin { font-size: .8rem; color: var(--color-muted); margin-top: .15rem; }
.item-precio-unit { font-size: .88rem; color: var(--color-primary); font-weight: 700; margin-top: .4rem; }
.item-controles { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.form-cantidad { display: flex; align-items: center; gap: .5rem; }
.qty-btn {
    width: 32px; height: 32px; border-radius: 50%;
    border: 1.5px solid var(--color-border); font-size: 1.1rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition); color: var(--color-text); background: var(--color-surface);
}
.qty-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: #fff5f5; }
.qty-display { font-weight: 800; min-width: 1.5rem; text-align: center; font-size: 1rem; }
.item-subtotal { font-weight: 800; font-size: 1.05rem; color: var(--color-primary); }
.btn-eliminar { font-size: 1rem; padding: .25rem .4rem; color: #ccc; transition: all var(--transition); border-radius: 6px; }
.btn-eliminar:hover { color: var(--color-primary); background: #fff0f0; }

.resumen-box {
    background: var(--color-surface); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow);
    border: 1px solid var(--color-border); position: sticky; top: 140px;
}
.resumen-titulo { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-bottom: 1.1rem; }
.resumen-linea {
    display: flex; justify-content: space-between;
    padding: .5rem 0; border-bottom: 1px solid var(--color-border);
    margin-bottom: .35rem; font-size: .9rem; color: var(--color-muted);
}
.resumen-total {
    display: flex; justify-content: space-between;
    padding: .75rem 0 .5rem; margin-top: .25rem;
    font-size: 1.1rem; font-weight: 800; color: var(--color-primary);
}
.campo-grupo { margin: .85rem 0; }
.campo-grupo label {
    display: block; font-size: .78rem; font-weight: 700;
    color: var(--color-muted); margin-bottom: .35rem;
    text-transform: uppercase; letter-spacing: .5px;
}
.campo-input {
    width: 100%; padding: .6rem .9rem;
    border: 1.5px solid var(--color-border); border-radius: 10px;
    font-family: inherit; font-size: .9rem; resize: vertical;
    transition: border-color var(--transition); background: #fafaf9;
}
.campo-input:focus { outline: none; border-color: var(--color-primary); background: #fff; }

.empty-state { text-align: center; padding: 3rem; color: var(--color-muted); font-size: 1rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .carrito-grid { grid-template-columns: 1fr; }
    .resumen-box { position: static; }
}
@media (max-width: 768px) {
    .detalle-grid { grid-template-columns: 1fr; }
    .hero-nombre { font-size: 1.5rem; }
    .hero-logo { width: 72px; height: 72px; }
    .productos-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: .85rem; }
    .card-img-wrap { height: 145px; }
    .card-body { padding: .8rem .9rem .9rem; }
    .categoria-titulo { font-size: 1.2rem; }
}
@media (max-width: 480px) {
    .container { padding: 0 .85rem; }
    .productos-grid { grid-template-columns: 1fr 1fr; gap: .65rem; }
    .brand-name { font-size: .95rem; }
    .hero-content { gap: 1rem; }
    .hero-negocio { padding: 1.75rem 0 2.75rem; }
    .page-titulo { font-size: 1.4rem; }
    .detalle-nombre { font-size: 1.5rem; }
}