/* ================= MODERN CARDS (DRIBBBLE STYLE) ================= */

/* Horizontal Scroll Container Override */
.menu-grid {
    display: flex !important;
    /* Force flex over grid */
    overflow-x: hidden;
    /* JS handles horizontal scroll with friction */
    gap: 20px;
    padding: 10px 20px 40px 20px;
    /* Bottom padding for shadow/scroll */
    /* scroll-snap removed — free scroll for better mobile feel */
    scroll-behavior: auto;
    -webkit-overflow-scrolling: auto;
    touch-action: pan-y;
    /* Let JS handle horizontal, browser handles vertical */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */

    /* Ensure it takes full width */
    width: 100%;
    margin: 0;
    max-width: 100%;

    /* Center items vertically if needed, but top alignment is safer */
    align-items: flex-start;
}

.menu-grid::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

/* Card Container */
.menu-item {
    background-color: var(--bg-card);
    /* Dark Grey #141414 */
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;

    /* HORIZONTAL SCROLL SPECS */
    min-width: 220px;
    /* Narrower cards = bigger images */
    width: 220px;
    flex-shrink: 0;
    /* Prevent shrinking */
    /* scroll-snap-align removed for free scroll */

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding-bottom: 30px;
}

.menu-item:first-child {
    margin-left: 0;
    /* Optional offset */
}

.menu-item:last-child {
    margin-right: 20px;
    /* Spacer at end */
}

@media (hover: hover) {
    .menu-item:hover {
        transform: translateY(-5px) scale(1.02);
        background-color: #1F1F1F;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        border-color: rgba(255, 183, 3, 0.2);
        z-index: 2;
    }
}

/* Image Container - 3D Stage */
.item-img-container {
    width: 100%;
    height: 230px;
    position: relative;
    /* Lighter center to contrast with the black shadow underneath */
    background: radial-gradient(circle at center, #2f2f2f 0%, #141414 75%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* EMPTY STATE CLEANUP (No Smoke, No Shadow, No Animation) */
.item-img-container.empty-state {
    background: transparent !important;
    /* Optional: or keep the gradient if user wants the dark card bg */
    box-shadow: none !important;
}

.item-img-container.empty-state::before {
    display: none !important;
    /* Hide Floor Shadow */
}

.item-img-container.empty-state .steam-container {
    display: none !important;
    /* Hide Smoke */
}

.item-img-container.empty-state .item-img {
    display: none !important;
    /* Hide Image (even transparent pixel) just in case */
}

/* The "Floor" Shadow */
.item-img-container::before {
    content: '';
    position: absolute;
    bottom: 15px;
    width: 140px;
    height: 15px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: shadowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.item-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    /* Padding to prevent touching edges */

    /* Re-enabled screen blend mode for Black Background AI extractions */
    mix-blend-mode: screen;
    mask-image: radial-gradient(circle at center, black 65%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 65%, transparent 100%);

    /* Filter drop shadow removed to prevent square shadows on black */
    animation: floatProduct 4s ease-in-out infinite;
    z-index: 2;
    transition: transform 0.5s ease;
}

/* ================= STEAM EFFECT ================= */
.steam-container {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 250px;
    z-index: 3;
    /* Above shadow, below image */
    pointer-events: none;
}

.steam-puff {
    position: absolute;
    top: 60%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5), transparent);
    filter: blur(12px);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    opacity: 0;
    width: 60px;
    height: 60px;
    animation: riseSteam 4s infinite;
    pointer-events: none;
    /* Crucial for iOS/Safari to not intercept scroll */
}

.puff-1 {
    left: 10px;
    animation-delay: 0s;
    transform: scale(0.9);
}

.puff-2 {
    left: 40px;
    animation-delay: 1.5s;
    transform: scale(1.1);
}

.puff-3 {
    left: -10px;
    animation-delay: 2.8s;
    transform: scale(0.8);
}

/* Animations */



/* Specific scaling removed for standardization */

/* Animations */
@keyframes floatProduct {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
        /* More subtle float (was -10px) */
    }
}

@keyframes riseSteam {
    0% {
        transform: translateY(0) scale(0.4) rotate(0deg);
        opacity: 0;
    }

    40% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-120px) scale(2.5) rotate(45deg);
        opacity: 0;
    }
}

@keyframes shadowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(0.92);
        /* Subtle pulse (was 0.85) */
        opacity: 0.4;
    }
}

/* Info Container */
.item-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Title */
.item-title {
    font-size: 1.1rem;
    color: white;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}

/* Description */
.item-desc {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 15px;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

/* Price */
.item-price {
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
    margin-bottom: 0;
    /* Remove bottom margin as it's in flex row */
    display: block;
    z-index: 25;
    position: relative;
    padding-left: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Fila inferior: precio + control de agregar */
.menu-item .bottom-row {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== Control de Agregar (wrapper) ===== */
.add-control {
    flex-grow: 1;
    margin-left: 15px;
    z-index: 25;
    position: relative;
    height: 45px;
}

/* Botón AGREGAR (estado inicial — no está en el carrito) */
.add-btn {
    width: 100%;
    height: 100%;
    background: var(--brand-red);
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    border: none;
    border-radius: 20px 0 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, opacity 0.2s;
}

@media (hover: hover) {
    .add-btn:hover {
        background: #FF5A6E;
    }
}

.add-btn::before {
    content: "AGREGAR";
}

/* ===== Controles de Cantidad (estado activo — en el carrito) ===== */
.qty-control {
    display: none;
    width: 100%;
    height: 100%;
    background: #27ae60;
    border-radius: 20px 0 20px 0;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.qty-control.active {
    display: flex;
}

.qty-control .qty-btn {
    width: 40px;
    height: 100%;
    border: none;
    background: transparent;
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.qty-control .qty-btn:active {
    background: rgba(0, 0, 0, 0.15);
}

.qty-control .qty-value {
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    min-width: 28px;
    text-align: center;
    user-select: none;
}