/* ============================================================
   style-mobile.css — NovaVet Layout MÓVIL (≤ 768px)
   Diseño:  Tarjeta centrada, fondo gris oscuro→claro,
            título flotante top-left, carrusel inferior.
   ============================================================ */

@media (max-width: 768px) {

    /* ══════════════════════════════════════════════
   BODY & APP CONTAINER
══════════════════════════════════════════════ */
    body {
        align-items: center;
        justify-content: center;
        padding: 0;
        overflow: hidden;
        background: #1e1e1e;
    }

    .app-container {
        width: 92vw;
        height: 94vh;
        margin: 0 auto;
        transform: scale(1) !important;
        border-radius: 28px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        padding: 0 !important;
        box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
        opacity: 1;
        overflow: hidden;
        /* Fondo: gris oscuro arriba → gris claro abajo */
        background: radial-gradient(circle at 5% 50%, rgb(69, 64, 70) 0%, rgb(180, 169, 182) 100%) !important;
        position: relative;
    }

    /* header sin posición propia → hereda del app-container */
    .main-header {
        position: static;
    }

    /* ══════════════════════════════════════════════
   WATERMARKS
══════════════════════════════════════════════ */
    /* Asset 7 / Asset 3 — centrado absoluto, 25% */
    .wm-1 {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80%;
        height: auto;
        opacity: 0.25;
        z-index: 0;
        pointer-events: none !important;
        object-fit: contain;
    }

    /* Outer watermark — oculto en mobile */
    .wm-outer {
        display: none !important;
    }

    /* Logo_HalfCut — inferior centrado, 10% */
    .wm-bottom {
        position: absolute !important;
        bottom: 0 !important;
        /* encima del carrusel */
        left: 0;
        transform: translateX(-1%) !important;
        width: 100%;
        height: auto;
        opacity: 0.10 !important;
        z-index: 0;
        pointer-events: none !important;
        object-fit: contain;
        display: block !important;
    }

    /* Catalog bg watermark — usa wm-1 de arriba */
    .wm-catalog-bg {
        position: absolute !important;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80%;
        height: auto;
        object-fit: contain;
        opacity: 0.10 !important;
        z-index: 0;
    }

    /* ══════════════════════════════════════════════
   HEADER — elementos de escritorio ocultos
══════════════════════════════════════════════ */
    .main-nav {
        display: none !important;
    }

    .logo-container {
        display: none !important;
    }

    #desktopCartContainer {
        display: none !important;
    }

    /* ─── CART + HAMBURGER top-right ─── */
    .mobile-header-tools {
        display: flex !important;
        align-items: center;
        gap: 0.9rem;
        position: absolute;
        top: 1.4rem;
        right: 1.4rem;
        z-index: 200;
        pointer-events: auto !important;
    }

    /* Cart: cuadrado redondeado violeta */
    .mobile-cart-btn {
        background: var(--purple);
        border: none;
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        cursor: pointer;
        box-shadow: 0 4px 16px rgba(155, 113, 175, 0.55);
    }

    .mobile-cart-btn img {
        width: 26px;
        height: 26px;
        object-fit: contain;
        filter: brightness(0) invert(1);
    }

    /* Ocultar carrito en pantalla de inicio */
    body:has(#homeSection.active) .mobile-cart-btn {
        display: none !important;
    }

    /* Hamburger */
    .hamburger-btn {
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        padding: 0;
    }

    .hamburger-btn i,
    .hamburger-btn svg {
        width: 32px !important;
        height: 32px !important;
    }

    /* ══════════════════════════════════════════════
   HOME SECTION — mobile
══════════════════════════════════════════════ */
    #homeSection {
        display: none;
        padding: 0;
        margin: 0;
        width: 100%;
        height: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
    }

    #homeSection.active {
        display: flex;
    }

    /* Logo NovaVet en home */
    .mobile-home-logo {
        display: block !important;
        position: absolute;
        top: 1.4rem;
        left: 1.4rem;
        width: 42px;
        z-index: 50;
    }

    /* Glass box ocupa toda la tarjeta */
    #homeSection>.home-glass-box {
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
        background: transparent !important;
        backdrop-filter: blur(2px) !important;
        box-shadow: none;
        padding: 1.5rem 1.5rem 4rem 1.5rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        text-align: center;
    }

    .home-title {
        font-size: 2.4rem;
        text-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
    }

    .home-desc {
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
    }

    /* Ticker en home */
    #homeSection .news-ticker {
        position: absolute;
        bottom: 10px !important;
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        height: 38px;
        top: auto !important;
        z-index: 100;
        background: rgba(0, 0, 0, 0.50) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    /* Ocultar ticker en catálogo */
    body:has(#catalogSection[style*="display: flex"]) .news-ticker {
        display: none !important;
    }

    /* Badges en home */
    .home-badges {
        width: 100%;
        justify-content: center;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .home-badge {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 0.9rem;
        background: rgba(40, 30, 50, 0.45);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 18px;
        text-align: center;
        font-size: 0.8rem;
        flex: 1;
        max-width: 140px;
    }

    .home-badge svg,
    .home-badge i {
        width: 32px !important;
        height: 32px !important;
    }

    /* Ocultar bottom-nav en home */
    #homeSection.active~.mobile-bottom-nav {
        display: none !important;
    }

    /* ══════════════════════════════════════════════
   CATALOG — layout mobile
══════════════════════════════════════════════ */
    .vertical-title-container {
        display: none !important;
    }

    .swipe-hint-overlay {
        display: none !important;
    }

    .social-footer {
        display: none !important;
    }

    .main-display {
        padding: 0;
        height: 100%;
        overflow: visible;
        margin: 0;
    }

    .display-content {
        padding: 0;
        height: 100%;
        margin-top: 0;
    }

    /* ─── BARRA DE CATEGORÍA ─── */
    /* Gradiente gris con texto derecha */
    .mobile-top-category-bar {
        display: flex !important;
        justify-content: flex-end;
        align-items: center;
        background: linear-gradient(-90deg, transparent 0%, rgba(73, 67, 75, 0.55) 50%, rgba(137, 122, 145, 0.7) 100%);
        backdrop-filter: blur(4px);
        padding: 0.35rem 1.2rem;
        width: 100%;
        font-family: var(--font-heading);
        font-weight: 500;
        letter-spacing: 5px;
        font-size: 1rem;
        position: absolute;
        top: 165px;
        /* debajo del bloque título */
        left: 0;
        z-index: 0;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.92);
        border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    }

    /* ══════════════════════════════════════════════
   ITEM SHOWCASE — stacking mobile
══════════════════════════════════════════════ */
    .item-showcase {
        display: block;
        position: relative;
        width: 100%;
        height: 100%;
    }

    /* display:contents → hijos fluyen al stacking context del showcase */
    .item-details {
        display: contents;
    }

    /* ─── TÍTULO (name · subtitle · version) ─── */
    .item-title {
        position: absolute;
        top: 2.3rem;
        left: 1.2rem;
        width: 60%;
        z-index: 200;
        text-align: left;
    }

    .item-title h2 {
        font-size: 2.2rem;
        font-weight: 800;
        line-height: 0.9;
        text-transform: uppercase;
        letter-spacing: 0px;
    }

    .item-title h3 {
        font-size: 0.85rem;
        font-weight: 300;
        letter-spacing: 3px;
        opacity: 0.88;
        text-transform: uppercase;
        margin-top: 0.25rem;
    }

    /* Version pill — debajo del h3 */
    .item-version-tag {
        position: absolute;
        display: inline-block !important;
        top: 0 !important;
        /* debajo del título */
        left: 1.2rem !important;
        z-index: 201;
        font-size: 0.78rem;
        padding: 0.35rem 1rem;
        background: var(--purple);
        border-radius: 20px;
        text-transform: uppercase;
        font-weight: 700;
        letter-spacing: 1.5px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30);
        white-space: nowrap;
    }

    /* State tag (NUEVA / NUEVA, etc.) — sobre la imagen */
    .item-state-tag {
        display: inline-block !important;
        position: absolute;
        top: 75px;
        /* zona de imagen */
        left: 1.2rem !important;
        z-index: 199;
        font-size: 0.85rem;
        font-weight: 800;
        letter-spacing: 1.5px;
        padding: 0.4rem 1.2rem;
        border-radius: 30px;
        text-transform: uppercase;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    }

    /* ─── IMAGEN DEL PRODUCTO ─── */
    .item-image-wrapper {
        position: absolute;
        top: 210px;
        left: 0;
        right: 0;
        bottom: 120px;
        z-index: 150;
        width: 100%;
        height: auto;
        max-width: 600px;
        max-height: 500px;
        display: block;
        justify-content: center;
        align-items: center;
        padding: 0;
    }

    .item-image-wrapper img,
    .scaled-image-container {
        object-fit: contain !important;
        transform: scaleX(0.5);

        /* ignorar el scale inline en mobile */
    }

    /* ─── BOTÓN "ME INTERESA" — cuadrado glass izquierda ─── */
    .add-interest-btn {
        position: absolute;
        top: 60%;
        /* debajo de la cat-bar */
        left: 2.2rem;
        width: 62px;
        height: 62px;
        border-radius: 14px;
        z-index: 199 !important;
        background: rgba(255, 255, 255, 0.18) !important;
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.30) !important;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25) !important;
        padding: 0 !important;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: white !important;
        transition: background 0.25s, transform 0.25s;
        cursor: pointer;
    }

    .add-interest-btn:hover,
    .add-interest-btn:active {
        background: var(--purple) !important;
        transform: scale(1.06);
    }

    /* Ocultar texto, mostrar solo ícono */
    .add-interest-btn .btn-text {
        display: none;
    }

    /* Label flotante a la derecha del botón */
    .add-interest-btn::after {
        content: 'ME INTERESA';
        position: absolute;
        top: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 1.5px;
        white-space: nowrap;
        color: rgba(255, 255, 255, 0.90);
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    }

    .add-interest-btn .sparkle-icon {
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border-radius: 0;
        backdrop-filter: none;
    }

    .mint-icon {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    /* ─── BOTÓN CAMBIO DE CATEGORÍA ─── */
    .mobile-cat-switch-btn {
        position: relative;
        top: 60%;
        /* debajo del btn ME INTERESA + label */
        left: 2.2rem;
        width: 60px;
        height: 60px;
        border-radius: 12px;
        z-index: 30;
        background: rgba(255, 255, 255, 0.13);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.25);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.20);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.25s, transform 0.25s;
        padding: 0;
    }

    .mobile-cat-switch-btn:hover,
    .mobile-cat-switch-btn:active {
        background: rgba(155, 113, 175, 0.40);
        transform: scale(1.06);
    }

    .mobile-cat-switch-btn img {
        width: 48px;
        height: 48px;
        object-fit: contain;
    }

    /* ─── VER CARACTERÍSTICAS — derecha vertical ─── */
    .ver-caract-trigger {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 150 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding-right: 4px;
    }

    .ver-caract-text {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        transform: rotate(180deg);
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.75);
        white-space: nowrap;
    }

    .ver-caract-btn {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        cursor: pointer;
        transition: background 0.2s;
    }

    .ver-caract-btn:hover,
    .ver-caract-btn:active {
        background: var(--purple);
    }

    .ver-caract-btn svg,
    .ver-caract-btn i {
        width: 18px !important;
        height: 18px !important;
    }

    /* ══════════════════════════════════════════════
   CARRUSEL — barra inferior full-width
══════════════════════════════════════════════ */
    .carousel-section {
        position: absolute;
        bottom: 0 !important;
        left: 0;
        width: 100%;
        height: 170px;
        /* background: rgba(20, 20, 20, 0.65); 
        backdrop-filter: blur(2px);
        opacity: 0.9; */
        border-top: 1px solid rgba(127, 82, 148, 0.1);
        border-radius: 0 0 28px 28px;
        z-index: 200;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0 0.8rem;
        pointer-events: auto !important;
    }

    .carousel-title {
        display: none;
    }

    .carousel-wrapper {
        flex: 1;
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        overflow: hidden;
    }

    .carousel-track-container {
        flex: 1;
        height: 120px;
        overflow: hidden;
        display: flex;
        align-items: center;
    }

    .carousel-track {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px;
    }

    /* Thumb: formato portrait */
    .carousel-item {
        width: 54px !important;
        height: 60px;
        min-width: 45px;
        border-radius: 12px;
        padding: 5px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(208, 0, 255, 0.18) !important;
        backdrop-filter: blur(6px);
        cursor: pointer;
        transition: all 0.25s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .carousel-item img {
        width: 95%;
        height: 95%;
        object-fit: contain;
    }

    .carousel-item.active {
        border: 2px solid var(--purple);
        background: rgba(155, 113, 175, 0.25);
        transform: scale(1.05);
    }

    .carousel-item:hover {
        background: rgba(255, 255, 255, 0.22);
    }

    /* Nav circular */
    .carousel-nav {
        width: 42px;
        height: 42px;
        min-width: 42px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.25);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
        transition: background 0.2s;
    }

    .carousel-nav:hover {
        background: rgba(255, 255, 255, 0.28);
    }

    .carousel-nav.next {
        margin-top: 0;
    }

    /* ══════════════════════════════════════════════
   PANEL OFF-CANVAS "CARACTERÍSTICAS"
══════════════════════════════════════════════ */
    .item-features {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        width: 88%;
        height: 100vh;
        z-index: 50001 !important;
        border-radius: 0;
        background: rgba(46, 31, 70, 0.9) !important;
        backdrop-filter: blur(10px) !important;
        border-left: 2px solid var(--purple-light) !important;
        border-right: none !important;
        transform: translateX(100%);
        transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 5rem 2rem 2rem 2rem !important;
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
        width: 88%;
        overflow-y: auto;
    }

    .item-features.mobile-open {
        transform: translateX(0);
    }

    .features-close-btn {
        position: absolute;
        top: 1.2rem;
        left: 1.2rem;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        cursor: pointer;
        transition: background 0.2s, transform 0.2s;
        padding: 0;
        z-index: 50002;
    }

    .features-close-btn:hover,
    .features-close-btn:active {
        background: var(--purple);
        transform: scale(1.1);
    }

    .features-close-btn svg {
        width: 22px !important;
        height: 22px !important;
    }

    /* Cuando el panel está abierto, bajar z-index de los controles que sobresalen */
    .app-container:has(.item-features.mobile-open) .carousel-section,
    .app-container:has(.item-features.mobile-open) .mobile-header-tools,
    .app-container:has(.item-features.mobile-open) .mobile-cat-switch-btn,
    .app-container:has(.item-features.mobile-open) .ver-caract-trigger {
        z-index: 1 !important;
    }

    .item-features ul {
        list-style: none;
        line-height: 2;
        font-size: 0.95rem;
        font-weight: 300;
        color: var(--white);
        letter-spacing: 0.5px;
    }

    .item-features ul li::before {
        content: '— ';
        color: var(--purple-light);
    }

    /* ══════════════════════════════════════════════
   MENU OVERLAY PANTALLA COMPLETA
══════════════════════════════════════════════ */
    .mobile-menu-overlay {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(30, 20, 45, 0.80) !important;
        backdrop-filter: blur(8px);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu-close {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
    }

    .mobile-menu-links {
        display: flex;
        flex-direction: column;
        gap: 1.8rem;
        align-items: center;
    }

    .mobile-menu-link {
        color: white;
        font-family: var(--font-heading);
        font-size: 1.7rem;
        font-weight: 500;
        text-decoration: none;
        background: none;
        border: none;
        letter-spacing: 2px;
        cursor: pointer;
        transition: color 0.8s;
    }

    .mobile-menu-link:hover {
        color: violet !important;
        font-weight: 800;
        transition: color 0.3s !important;
        display: flex;
    }

    /* ══════════════════════════════════════════════
   BOTTOM NAV — OCULTO (reemplazado por carrusel)
══════════════════════════════════════════════ */
    .mobile-bottom-nav {
        display: none !important;
    }

    /* ══════════════════════════════════════════════
   CART SIDEBAR — ancho total en mobile
══════════════════════════════════════════════ */
    /* Elevar el sidebar por encima de TODOS los controles móviles
       (carrusel z:200, header-tools z:200, ver-caract z:150, etc.) */
    .cart-sidebar {
        z-index: 5000 !important;
        width: 96%;
        height: 100%;
    }


    /* ══════════════════════════════════════════════
   CONTACT — columna única en mobile
══════════════════════════════════════════════ */
    .contact-container {
        width: 96%;
        padding: 2rem 1.2rem;
        border-radius: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .contact-grid {
        grid-template-columns: 2fr !important;
        gap: 1.5rem;
    }

    .form-row {
        flex-direction: column;
    }

    /* ══════════════════════════════════════════════
   NOVEDADES — una por vez en mobile
══════════════════════════════════════════════ */
    .novedades-wrapper {
        padding: 1rem 0 !important;
    }

    .back-btn {
        padding: 1rem 1.5rem !important;
    }

    .novedades-container {
        padding: 0 1.2rem !important;
        height: 100%;
        justify-content: flex-start;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .novedades-track-container {
        flex: 1;
        display: flex;
        align-items: center;
        width: 100%;
        overflow: visible;
        /* Let the track overflowing items be seen if we want */
    }

    .novedades-track {
        gap: 1.2rem;
        height: 78vh;
        width: 100%;
    }

    .novedades-item {
        flex: 0 0 100% !important;
        height: 90% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        /* CRITICAL: prevents flex child from expanding beyond 100% due to content */
        overflow: hidden;
        display: flex;
        flex-direction: column;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.12);
        margin: 0;
        box-sizing: border-box;
    }

    .news-img {
        width: 100% !important;
        height: 45% !important;
        max-height: 45% !important;
        object-fit: contain !important;
        padding: 1rem;
        background: rgba(0, 0, 0, 0.2);
        /* optional subtle backdrop for the image */
    }

    .news-content {
        padding: 1.5rem !important;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
    }

    .novedades-controls {
        position: absolute;
        bottom: 1.5rem;
        left: 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 0 1.5rem;
        z-index: 50;
        pointer-events: auto;
    }

    .news-title {
        font-size: 1.3rem !important;
        white-space: normal !important;
        word-wrap: break-word;
        line-height: 1.3;
    }

    .news-text {
        font-size: 0.9rem !important;
        white-space: normal !important;
        word-wrap: break-word;
        line-height: 1.5;
    }

}

/* end @media mobile */