/* ============================================================
   MENÚ QR — DOÑA CHAYO
   Paleta sofisticada · serif + sans · transiciones suaves
   ============================================================ */

:root {
    /* Paleta — comedor apetitoso (naranja/rojo cálido + verde fresco) */
    --fondo: #fff8f2;          /* crema cálida */
    --fondo-alt: #ffffff;
    --tinta: #23150c;          /* café-marrón oscuro */
    --tinta-suave: #6e5d50;    /* marrón grisáceo */
    --acento: #e8590c;         /* naranja apetitoso */
    --acento-2: #d9480f;       /* naranja profundo */
    --verde: #2f9e44;          /* verde fresco */
    --borde: #f1e3d5;
    --sombra: 0 8px 24px rgba(251, 108, 26, 0.10);
    --sombra-hover: 0 14px 34px rgba(251, 108, 26, 0.18);

    /* Tipografía — sans moderna con carácter */
    --fuente-titulo: 'Plus Jakarta Sans', 'Poppins', 'Sora', system-ui, sans-serif;
    --fuente-sans: 'Manrope', 'Inter', system-ui, sans-serif;

    --radio: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--fondo);
    color: var(--tinta);
    font-family: var(--fuente-sans);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Header con degradado texturizado ---------- */
.header-marca {
    position: relative;
    color: #fff;
    text-align: center;
    padding: 44px 20px 38px;
    background:
        radial-gradient(1200px 500px at 50% -10%, rgba(232, 89, 12, 0.55), transparent 60%),
        linear-gradient(160deg, #23150c 0%, #3d2414 55%, #1a0f08 100%);
    overflow: hidden;
    border-bottom: 3px solid var(--acento);
}

.header-marca::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,0.025) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.025) 25%, transparent 25%);
    background-size: 32px 32px;
    pointer-events: none;
}

.header-marca .logo {
    max-height: 84px;
    margin-bottom: 14px;
    border-radius: 12px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.header-marca h1 {
    font-family: var(--fuente-titulo);
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.header-marca p {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-top: 8px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

/* ---------- Chips / tabs de categorías (sticky) ---------- */
.barra-categorias {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--borde);
    padding: 12px 8px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.barra-categorias::-webkit-scrollbar { display: none; }

.chip-categoria {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--fondo-alt);
    border: 1px solid var(--borde);
    color: var(--tinta-suave);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.chip-categoria:hover {
    border-color: var(--acento);
    color: var(--acento);
    transform: translateY(-1px);
}

.chip-categoria.activo {
    background: var(--acento);
    border-color: var(--acento);
    color: #fff;
    box-shadow: 0 6px 16px rgba(232, 89, 12, 0.32);
}

/* ---------- Secciones de categoría ---------- */
.seccion-categoria {
    padding-top: 40px;
    margin-top: -40px;
    scroll-margin-top: 76px;
}

.categoria-titulo {
    font-family: var(--fuente-titulo);
    font-weight: 800;
    color: var(--tinta);
    font-size: 1.4rem;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 20px;
}

.categoria-titulo i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(232, 89, 12, 0.12);
    color: var(--acento);
    font-size: 1.15rem;
}

.categoria-titulo::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--borde), transparent);
}

/* ---------- Cards de producto ---------- */
.producto-card {
    background: var(--fondo-alt);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--borde);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-hover);
}

.producto-card .media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(140deg, #efe7db, #e3d7c6);
    overflow: hidden;
}

.producto-card .media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.producto-card:hover .media img { transform: scale(1.06); }

.producto-card .media .icono-ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #d9b090;
}

.badge-destacado {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: var(--acento);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.producto-card .body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.producto-fila {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.producto-nombre {
    font-family: var(--fuente-titulo);
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--tinta);
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.producto-precio {
    color: var(--acento);
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.producto-desc {
    font-size: 0.84rem;
    color: var(--tinta-suave);
    line-height: 1.45;
    margin: 0;
}

/* ---------- Barra de contacto inferior ---------- */
.barra-contacto {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: var(--fondo-alt);
    border-top: 1px solid var(--borde);
    display: flex;
    justify-content: space-around;
    padding: 10px 6px;
    box-shadow: 0 -6px 20px rgba(43, 33, 24, 0.06);
}

.barra-contacto a,
.barra-contacto span {
    color: var(--tinta);
    text-decoration: none;
    font-size: 0.72rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: color 0.2s ease;
}

.barra-contacto a:hover { color: var(--acento); }

.barra-contacto i {
    font-size: 1.4rem;
    color: var(--acento);
}

/* ---------- Botón flotante WhatsApp ---------- */
.btn-wa-flotante {
    position: fixed;
    right: 18px;
    bottom: 74px;
    z-index: 30;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-wa-flotante:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.6);
    color: #fff;
}

/* ---------- Enlace discreto al panel ---------- */
.enlace-admin {
    display: block;
    text-align: center;
    padding: 12px 0 14px;
    font-size: 13px;
    color: #c9bcb0;
    text-decoration: none;
    transition: color 0.2s ease;
    opacity: 0.75;
    background: var(--fondo);
}

.enlace-admin i {
    font-size: 15px;
}

.enlace-admin:hover {
    color: var(--tinta-suave);
    opacity: 1;
}

/* ---------- Skeleton (loading) ---------- */
.skeleton {
    position: relative;
    overflow: hidden;
    background: #e9e1d5;
    border-radius: var(--radio);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.4s infinite;
}

.skeleton-cabecera { height: 160px; border-radius: 0; }
.skeleton-texto { height: 14px; margin-top: 10px; border-radius: 6px; }
.skeleton-texto.corto { width: 55%; }
.skeleton-chip { height: 38px; border-radius: 999px; min-width: 90px; }

.skeleton-card { height: 230px; }

/* ---------- Animaciones ---------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

/* Stagger de entrada de cards */
.producto-card:nth-child(1) { animation-delay: 0.03s; }
.producto-card:nth-child(2) { animation-delay: 0.08s; }
.producto-card:nth-child(3) { animation-delay: 0.13s; }
.producto-card:nth-child(4) { animation-delay: 0.18s; }
.producto-card:nth-child(5) { animation-delay: 0.23s; }

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
    .header-marca h1 { font-size: 2.5rem; }
    .categoria-titulo { font-size: 1.6rem; }
}

/* ============================================================
   PANEL DE ADMINISTRACIÓN — dashboard
   ============================================================ */
.panel-layout {
    display: flex;
    min-height: 100vh;
}

.panel-sidebar {
    width: 230px;
    background: linear-gradient(180deg, #2b2118, #1d1510);
    color: #fff;
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    flex-shrink: 0;
}

.panel-sidebar .brand {
    font-family: var(--fuente-titulo);
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: 24px;
    padding: 0 8px;
    letter-spacing: -0.3px;
}

.panel-sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    margin-bottom: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.panel-sidebar .nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.panel-sidebar .nav-link.activo { background: var(--acento); color: #fff; }

.panel-main { flex: 1; padding: 24px; background: #f7f4ef; }

.panel-tab { display: none; }
.panel-tab.activo { display: block; }

.producto-bloque { cursor: grab; }
.producto-bloque:active { cursor: grabbing; }
.categoria-bloque { cursor: grab; }
.categoria-bloque:active { cursor: grabbing; }

.drag-handle { cursor: grab; color: #bbb; }
.sortable-ghost { opacity: 0.4; }

.preview-frame {
    width: 100%;
    height: 560px;
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    background: #fff;
}

@media (max-width: 768px) {
    .panel-layout { flex-direction: column; }
    .panel-sidebar { width: 100%; height: auto; position: static; }
}
