/* =========================================================
   RESTAURANTE.CSS — ORDENAHORA PRO
   Este archivo controla:
   1. Hero del restaurante
   2. Buscador del menú
   3. Cards pequeñas tipo DoorDash/Uber Eats
   4. Carrito flotante redondo
   5. Panel lateral del pedido
   6. Responsive móvil/tablet
========================================================= */

/* Color principal dinámico.
   Se cambia desde restaurante.php:
   <body style="--brand: <?= e($restaurante['color_tema'] ?: '#22c55e') ?>;">
*/
:root{
    --brand:#22c55e;
    --bg:#0b1120;
    --card:#111827;
    --line:rgba(255,255,255,.09);
    --text:#ffffff;
    --muted:#cbd5e1;
}

/* =========================================================
   HERO DEL RESTAURANTE
========================================================= */

.restaurant-hero{
    position:relative;
    overflow:hidden;
    padding:64px 0 42px;
    background:#020617;
}

.restaurant-hero-bg{
    position:absolute;
    inset:0;
    z-index:0;
}

.restaurant-hero-bg img{
    width:100%;
    height:100%;
    object-fit:cover;
    opacity:.28;
}

.restaurant-hero-overlay{
    position:relative;
    z-index:1;
    background:linear-gradient(
        180deg,
        rgba(2,6,23,.72),
        rgba(2,6,23,.94)
    );
    padding:28px 0;
}

.restaurant-box{
    display:flex;
    align-items:center;
    gap:22px;
    flex-wrap:wrap;
}

.restaurant-logo{
    width:96px;
    height:96px;
    flex:0 0 96px;
    object-fit:cover;
    border-radius:24px;
    border:4px solid rgba(255,255,255,.08);
    background:#111827;
    box-shadow:0 16px 35px rgba(0,0,0,.35);
}

.restaurant-info{
    flex:1;
    min-width:260px;
}

.restaurant-info h1{
    font-size:clamp(1.9rem, 5vw, 3.1rem);
    line-height:1.05;
    margin-bottom:10px;
    color:#fff;
}

.restaurant-info p{
    color:var(--muted);
    margin-bottom:14px;
}

.restaurant-meta{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin:14px 0;
}

.restaurant-meta span{
    display:inline-flex;
    align-items:center;
    max-width:100%;
    padding:8px 12px;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.12);
    color:#e5eefc;
    font-size:.9rem;
    word-break:break-word;
}

.restaurant-state{
    display:flex;
    align-items:center;
    gap:10px;
}

.status-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:8px 12px;
    border-radius:999px;
    font-size:.82rem;
    font-weight:900;
}

.status-badge.success{
    background:color-mix(in srgb, var(--brand) 18%, transparent);
    border:1px solid color-mix(in srgb, var(--brand) 35%, transparent);
    color:#86efac;
}

.status-badge.danger{
    background:rgba(239,68,68,.12);
    border:1px solid rgba(239,68,68,.26);
    color:#f87171;
}

/* =========================================================
   SECCIÓN MENÚ
========================================================= */

.restaurant-layout-section{
    padding-top:42px;
}

.restaurant-layout{
    display:grid;
    grid-template-columns:1fr;
    gap:28px;
}

.menu-column{
    min-width:0;
}

.section-head{
    margin-bottom:16px;
}

.section-head h2{
    font-size:1.65rem;
    margin-bottom:6px;
    color:#fff;
}

.menu-group{
    margin-bottom:30px;
}

.menu-group-head{
    margin-bottom:14px;
}

.menu-group-head h3{
    font-size:1.1rem;
    color:#fff;
}

/* =========================================================
   BUSCADOR DEL MENÚ
========================================================= */

.menu-search-box{
    margin:18px 0 24px;
}

.menu-search-box input{
    width:100%;
    padding:15px 18px;
    border-radius:18px;
    border:1px solid rgba(255,255,255,.10);
    background:rgba(255,255,255,.05);
    color:#fff;
    outline:none;
    font-weight:800;
}

.menu-search-box input::placeholder{
    color:#94a3b8;
}

.menu-search-box input:focus{
    border-color:var(--brand);
    box-shadow:0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent);
}

.menu-no-results{
    padding:18px;
    border-radius:18px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
    color:#cbd5e1;
    margin-bottom:20px;
}

/* =========================================================
   CARDS MENÚ — ESTILO PREMIUM OSCURO (PRO)
========================================================= */

.products-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(250px, 1fr));
    gap:20px;
}

/* CARD */
.product-card{
    border-radius:22px;
    overflow:hidden;

    background:#111414;

    border:1px solid rgba(245, 169, 5, 0.959);

    box-shadow:
        0 10px 30px rgba(211, 173, 3, 0.74);

    transition:.25s ease;
}

.product-card:hover{
    transform:translateY(-6px);
    border-color:var(--brand);
    box-shadow:
        0 18px 40px rgba(0,0,0,.45),
        0 0 0 1px color-mix(in srgb, var(--brand) 40%, transparent);
}

/* IMAGEN */
.product-card-image{
    width:100%;
    height:170px;
    object-fit:cover;
}

/* CONTENIDO */
.product-card-body{
    padding:16px;
}

/* TÍTULO */
.product-card-body h4{
    font-size:16px;
    font-weight:800;
    color:#ffffff;
    margin-bottom:6px;
}

/* DESCRIPCIÓN */
.product-card-body p{
    font-size:13px;
    color:#94a3b8;
    margin-bottom:14px;
    line-height:1.4;

    display:-webkit-box;
    
    -webkit-box-orient:vertical;
    overflow:hidden;
}

/* FILA PRECIO + BOTÓN */
.product-price-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
}

/* PRECIO */
.product-price-row strong{
    font-size:15px;
    font-weight:900;

    color:#f0594f;
}

/* BOTÓN */
.add-to-cart-btn{
    padding:9px 14px;
    border-radius:999px;

    font-size:20px;
    font-weight:900;

    background:rgb(34, 33, 33);
    color:#02c20cf1;

    border:1px solid rgba(255,255,255,.15);

    transition:.2s ease;
}

.add-to-cart-btn:hover{
    background:var(--brand);
    color:#d0e6d9;
    border-color:transparent;
}

/* 📱 MOBILE */
@media (max-width:600px){
    .products-grid{
        grid-template-columns:repeat(2, 1fr);
        gap:14px;
    }

    .product-card-image{
        height:130px;
    }

    .product-card-body{
        padding:12px;
    }

    .product-card-body h4{
        font-size:14px;
    }

    .product-card-body p{
        font-size:12px;
    }
}

/* =========================================================
   BOTONES PEQUEÑOS
========================================================= */

.mini-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:9px 12px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(255,255,255,.04);
    color:#fff;
    cursor:pointer;
    font-weight:800;
    transition:.18s ease;
}

.mini-btn:hover{
    background:rgba(255,255,255,.08);
}

.mini-btn.danger{
    border-color:rgba(239,68,68,.24);
    color:#fca5a5;
    cursor:not-allowed;
}

.panel-card{
    background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
    border:1px solid rgba(255,255,255,.08);
    border-radius:22px;
    padding:20px;
}

/* =========================================================
   CARRITO FLOTANTE REDONDO PRO
========================================================= */

.cart-column{
    display:none;
}

.floating-cart-btn{
    position:fixed;
    right:24px;
    bottom:92px;
    z-index:10030;

    width:74px;
    height:74px;
    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    border:2px solid rgba(255,255,255,.18);
    cursor:pointer;

    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 28%),
        linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 62%, #0f172a));

    box-shadow:
        0 22px 45px rgba(0,0,0,.38),
        0 12px 30px color-mix(in srgb, var(--brand) 45%, transparent),
        inset 0 1px 0 rgba(255,255,255,.25);

    transition:transform .2s ease, box-shadow .2s ease;
}

.floating-cart-btn:hover{
    transform:translateY(-3px) scale(1.06);
    box-shadow:
        0 28px 55px rgba(0,0,0,.42),
        0 16px 38px color-mix(in srgb, var(--brand) 55%, transparent),
        inset 0 1px 0 rgba(255,255,255,.28);
}

.floating-cart-icon{
    width:46px;
    height:46px;
    border-radius:50%;
    display:grid;
    place-items:center;

    background:rgba(2,6,23,.28);
    color:#fdfcf9;
    font-size:1.35rem;

    box-shadow:inset 0 0 0 1px rgba(255,255,255,.14);
}

.floating-cart-count{
    position:absolute;
    top:-7px;
    right:-7px;

    min-width:30px;
    height:30px;
    padding:0 8px;

    border-radius:999px;
    display:grid;
    place-items:center;

    background:#ef4444;
    color:#fff;
    border:3px solid #0b1120;

    font-size:.82rem;
    font-weight:900;

    box-shadow:
        0 8px 18px rgba(239,68,68,.38),
        0 0 0 2px rgba(255,255,255,.08);
}

/* móvil */
@media (max-width:600px){
    .floating-cart-btn{
        right:18px;
        bottom:24px;
        width:66px;
        height:66px;
    }

    .floating-cart-icon{
        width:40px;
        height:40px;
        font-size:1.2rem;
    }

    .floating-cart-count{
        min-width:28px;
        height:28px;
        font-size:.78rem;
    }
}
/* =========================================================
   PANEL LATERAL DEL CARRITO
========================================================= */

.cart-drawer-overlay{
    position:fixed;
    inset:0;
    background:rgba(2,8,23,.58);
    opacity:0;
    pointer-events:none;
    transition:opacity .22s ease;
    z-index:10040;
    backdrop-filter:blur(3px);
}

.cart-drawer-overlay.is-open{
    opacity:1;
    pointer-events:auto;
}

.cart-drawer{
    position:fixed;
    top:0;
    right:0;
    width:min(440px, 100%);
    height:100vh;
    z-index:10050;
    transform:translateX(100%);
    transition:transform .28s ease;
    padding:14px;
    pointer-events:none;
}

.cart-drawer.is-open{
    transform:translateX(0);
    pointer-events:auto;
}

.cart-box{
    height:calc(100vh - 28px);
    overflow:auto;
    border-radius:24px;
    background:linear-gradient(180deg, rgba(10,16,30,.99), rgba(12,20,36,.985));
    border:1px solid rgba(255,255,255,.08);
    padding:18px;
    box-shadow:0 28px 60px rgba(0,0,0,.36);
}

.cart-head{
    position:sticky;
    top:0;
    z-index:3;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding-bottom:12px;
    margin-bottom:14px;
    background:linear-gradient(180deg, rgba(10,16,30,.99), rgba(10,16,30,.92));
    backdrop-filter:blur(10px);
}

.cart-head h3{
    font-size:1.18rem;
    color:#fff;
}

.cart-head-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.cart-items{
    display:grid;
    gap:10px;
    margin-bottom:18px;
}

/* Producto dentro del carrito */
.cart-item{
    padding:14px;
    border-radius:16px;
    background:rgba(255,255,255,.035);
    border:1px solid rgba(255,255,255,.07);
}

.cart-item-main{
    display:flex;
    justify-content:space-between;
    gap:12px;
    margin-bottom:10px;
}

.cart-item-name{
    font-weight:900;
    color:#fff;
}

.cart-item-price{
    color:var(--brand);
    font-weight:900;
}

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

.qty-btn{
    width:34px;
    height:34px;
    border:none;
    border-radius:12px;
    background:rgba(255,255,255,.08);
    color:#fff;
    cursor:pointer;
    font-weight:900;
}

.qty-btn:hover{
    background:rgba(255,255,255,.14);
}

.qty-number{
    min-width:22px;
    text-align:center;
    font-weight:900;
    color:#fff;
}

.cart-item-subtotal{
    color:#fff;
    font-weight:900;
}

/* Resumen */
.cart-summary{
    padding-top:14px;
    border-top:1px solid rgba(255,255,255,.08);
    margin-bottom:18px;
}

.summary-line{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:8px;
    color:#dbe6f5;
}

.summary-line.total{
    margin-top:10px;
    padding-top:10px;
    border-top:1px dashed rgba(255,255,255,.12);
    font-size:1.08rem;
    font-weight:900;
    color:#fff;
}

.summary-note{
    margin-top:8px;
    font-size:.92rem;
    color:#cbd5e1;
}

/* =========================================================
   FORMULARIO DEL PEDIDO
========================================================= */

.checkout-form{
    display:grid;
    gap:16px;
}

.checkout-block{
    display:grid;
    gap:10px;
}

.checkout-block h4{
    margin-bottom:4px;
    font-size:1.02rem;
    color:#fff;
}

.checkout-form label{
    font-size:.92rem;
    font-weight:700;
    color:#fff;
}

.checkout-form input,
.checkout-form textarea{
    width:100%;
    border:none;
    outline:none;
    padding:12px 14px;
    border-radius:14px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
    color:#fff;
}

.checkout-form input::placeholder,
.checkout-form textarea::placeholder{
    color:#94a3b8;
}

.checkout-form input:focus,
.checkout-form textarea:focus{
    border-color:var(--brand);
    box-shadow:0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent);
}

.checkout-form textarea{
    min-height:100px;
    resize:vertical;
}

.checkout-btn{
    width:100%;
}

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

/* Tablet */
@media (max-width:900px){
    .restaurant-hero{
        padding:44px 0 28px;
    }

    .restaurant-box{
        align-items:flex-start;
    }

    .restaurant-meta{
        flex-direction:column;
        align-items:flex-start;
    }

    .restaurant-meta span{
        width:100%;
    }

    .products-grid{
        grid-template-columns:repeat(auto-fill, minmax(190px, 1fr));
    }
}

/* Celular */
@media (max-width:600px){
    .restaurant-hero{
        padding:30px 0 18px;
    }

    .restaurant-hero-overlay{
        padding:22px 0;
    }

    .restaurant-box{
        flex-direction:column;
        align-items:flex-start;
        gap:14px;
    }

    .restaurant-logo{
        width:78px;
        height:78px;
        flex:0 0 78px;
    }

    .restaurant-info{
        min-width:0;
        width:100%;
    }

    .restaurant-info h1{
        font-size:1.75rem;
    }

    .products-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:12px;
    }

    .product-card-image{
        height:115px;
    }

    .product-card-body{
        padding:10px;
    }

    .product-card-body h4{
        font-size:14px;
    }

    .product-card-body p{
        font-size:12px;
    }

    .floating-cart-btn{
        right:18px;
        bottom:24px;
        width:62px;
        height:62px;
    }

    .cart-drawer{
        padding:10px;
    }

    .cart-box{
        height:calc(100vh - 20px);
        border-radius:20px;
        padding:14px 14px 220px;
    }
}

/* Celular muy pequeño */
@media (max-width:380px){
    .products-grid{
        grid-template-columns:1fr;
    }

    .product-card-image{
        height:145px;
    }
}


/* ===============================
   HORARIO MINI PRO (COMPACTO)
================================= */

.horario-mini-card{
    border-radius:18px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
    overflow:hidden;
}

/* HEADER */
.horario-mini-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:12px 14px;
    cursor:pointer;
}

.horario-mini-head strong{
    color:#fff;
    display:block;
    font-size:.95rem;
}

.mini-hoy{
    display:block;
    font-size:.75rem;
    color:#cbd5e1;
}

/* STATUS */
.mini-status span{
    font-size:.75rem;
    font-weight:900;
}

.mini-status .open{
    color: #22c55e;
}

.mini-status .closed{
    color:#ef4444;
}

/* FLECHA */
.mini-arrow{
    font-size:.8rem;
    color:#94a3b8;
    transition:.3s;
}

/* DROPDOWN */
.horario-dropdown{
    max-height:0;
    overflow:hidden;
    transition:max-height .3s ease;
    border-top:1px solid rgba(255,255,255,.06);
}

/* CUANDO ABRE */
.horario-mini-card.active .horario-dropdown{
    max-height:400px;
}

.horario-mini-card.active .mini-arrow{
    transform:rotate(180deg);
}

/* FILAS */
.mini-row{
    display:flex;
    justify-content:space-between;
    padding:10px 14px;
    font-size:.8rem;
    color:#cbd5e1;
}

.mini-row span:first-child{
    color:#fff;
    font-weight:700;
}

.mini-row.today{
    background:color-mix(in srgb, var(--brand) 15%, transparent);
}




/* ===============================
  producto extra
================================= */

.producto-extras{
    margin-top:14px;
    padding-top:12px;
    border-top:1px dashed rgba(255,255,255,.12);
}

.extras-title{
    font-size:.9rem;
    margin-bottom:8px;
    color:#999;
}

.extra-check{
    display:flex;
    align-items:center;
    gap:8px;
    margin-top:6px;
    font-size:.95rem;
}
/* =====================================
   LINKS RESTAURANTE
===================================== */

.restaurant-links{

    margin-top:24px;

    padding:18px;

    border-radius:22px;

    background:
    rgba(255,255,255,.04);

    border:
    1px solid rgba(255,255,255,.08);

}

.restaurant-links h3{

    margin-bottom:14px;

    color:#fff;

}

.restaurant-links-grid{

    display:flex;

    flex-wrap:wrap;

    gap:12px;

}

.restaurant-link-btn{

    padding:12px 18px;

    border-radius:999px;

    background:
    rgba(255,255,255,.06);

    border:
    1px solid rgba(255,255,255,.10);

    color:#fff;

    text-decoration:none;

    font-weight:800;

    transition:.2s ease;

}

.restaurant-link-btn:hover{

    transform:translateY(-2px);

    background:var(--brand);

    color:#fff;

}




