html {
    min-height: 100%;
    min-width: 100%;
    background-image: url('fondo.webp'), radial-gradient(ellipse at center, #047806 0%, #023803 50%, #000501 100%);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #0b0f19;
}

@media (max-width: 767px) {
    /* 1. Mueve el estilo al body (o pon ambos si prefieres), no solo al html */
    /* Limpiamos el fondo del body/html */
  html, body {
    background-color: #0b0f19;
  }

  /* Capa de fondo dedicada */
  .mobile-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh; /* Adapta la altura a la pantalla real de Safari */
    z-index: -1;   /* Lo envía detrás de todo el contenido */
    pointer-events: none; /* Evita interferir con clics */

    background-image: url("fondo-mobile.webp"), radial-gradient(ellipse at center, #047806 0%, #023803 50%, #000501 100%);
    background-position: center top, center center;
    background-size: cover, cover;
    background-repeat: no-repeat;

    /* Aceleración por hardware para forzar a Safari a renderizarlo bien */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

body {
    min-height: 100vh;
    min-width: 100vw;
    background: transparent !important;
}

/* Removed .bg-image fallback (now using CSS background-image only). */

.header-subtitle,
.intro {
    color: #f1ffe8 !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.product-meta {
    color: #b7ff3c !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.header-banner,
.product-card {
    background: rgba(3, 20, 8, 0.78) !important;
    border-color: rgba(126, 255, 0, 0.35) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3), inset 0 0 24px rgba(71, 255, 0, 0.05);
}

.product-gallery {
    background: transparent !important;
    border-color: rgba(126, 255, 0, 0.25) !important;
}

.gallery-slide {
    background: transparent !important;
}

.gallery-slide img,
.image-frame {
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

.contact-panel{
position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 5px;
    gap: 10px;
    transform: translateX(-50%);
    color: #f1ffe8;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    width: 100%;
    background: rgba(3, 20, 8, 0.78) !important;
    border-color: rgba(126, 255, 0, 0.35) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3), inset 0 0 24px rgba(71, 255, 0, 0.05);
    height: 105px;
    border-radius: 25px 25px 0px 0px;
}

        .contact-title {
            font-size: 1.1rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .whatsapp-links {
            display: flex;
            gap: 12px;
        }

        .whatsapp-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-height: 42px;
            padding: 9px 14px;
            border: 2px solid #b7ff3c;
            border-radius: 999px;
            background: rgba(3, 20, 8, 0.92);
            color: #ffffff;
            font-size: 0.9rem;
            text-decoration: none;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
            transition: background-color 0.2s ease, transform 0.2s ease;
        }

        .whatsapp-link:hover,
        .whatsapp-link:focus-visible {
            background: #1a991a;
            transform: translateY(-2px);
        }

        .whatsapp-icon {
            display: inline-grid;
            width: 22px;
            height: 22px;
            place-items: center;
            border-radius: 50%;
            background: #25d366;
            color: #ffffff;
            font-size: 0.85rem;
            font-weight: 900;
        }

@media (max-width: 767px) {
    html {
        /* mobile: use a lighter mobile-optimized image and avoid fixed attachment */
        background-image: url("fondo-mobile.webp"), radial-gradient(ellipse at center, #047806 0%, #023803 50%, #000501 100%);
        background-position: center top, center center;
        background-size: 100% auto, cover;
        background-repeat: no-repeat;
        background-attachment: scroll !important;
        background-color: #0b0f19;
        background-clip: border-box;
    }

    .catalog-button {
        width: calc(80% - 32px);
        bottom: 175px;
        padding: 16px 5px;
    }

    .contact-panel {
        bottom: 18px;
        width: 100%;
    }

    .whatsapp-links {
        width: calc(100% - 32px);
        justify-content: center;
    }

    .whatsapp-link {
        flex: 1;
        justify-content: center;
        padding: 9px 8px;
        font-size: 0.78rem;
    }
}

/* Workaround: iOS Safari and other mobile webviews don't handle background-attachment: fixed well.
   Detect touch-capable WebKit and force scroll attachment to prevent broken/white backgrounds. */
@supports (-webkit-overflow-scrolling: touch) {
    html {
        background-attachment: scroll !important;
        -webkit-background-size: cover;
        background-size: cover;
    }
}

/* No inline <img> fallback used anymore. Mobile behavior handled via media query background above. */