/*
 Theme Name:   GeneratePress Child (Adhoc Powered)
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/**
*
* ROOTS / GENERALES
*
**/

html {
    scroll-behavior: smooth;
}

/* Aplica a todos los IDs */
[id] {
    scroll-margin-top: 100px;
}

/* EXCEPCIÓN: Quita el margen a los paneles de WPBakery para no romperlos */
.vc_tta-panels [id], 
[id^="vc_"] {
    scroll-margin-top: 0px !important;
}

:root{
    --color-primary: #016ce0;
    --color-secondary: #000022;
    --color-heading: #000022;
    --color-text: #030213;
    --color-text-muted: #555;
    --site_width: 1300px;
}

.texto h1, 
.texto h2, 
.texto h3, 
.texto h4, 
.texto h5, 
.texto h6 {
    color: var(--color-heading);
}

.texto p,
.texto li,
.texto span{
    color: var(--color-text);
}

.texto a {
    color: var(--color-primary);
}

.blanco h2,
.blanco p{
    color: #fff !important;
}

.texto ul{
    margin-left: 0px !important;
    padding-left: 20px !important;
}

/* ============================
* FUNCTIONS.PHP STYLING - ADHOC 
============================ */

/* Eventos/Contador carrito */

.cart-count--hidden { display: none !important; }

@keyframes cart-bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.45); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.cart-count--bump { animation: cart-bump 0.35s ease; }

/* Lang Dropdown - adhoc_lang_switcher */

.lang-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding-top: 8px;
    padding-bottom: 8px; /* Puente invisible para no perder el hover al bajar hacia el dropdown */
}

.lang-dropdown .current-lang {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-dropdown .current-lang img {
    width: 24px;
    height: auto;
    display: block;
    border-radius: 2px;
}

.lang-dropdown .rest-of-langs {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 9999;
    flex-direction: column;
    gap: 4px;
    min-width: 80px;
}

.lang-dropdown:hover .rest-of-langs {
    display: flex;
}

.lang-dropdown .lang-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.lang-dropdown .lang-item:hover {
    background: #f0f0f0;
}

.lang-dropdown .lang-item img {
    width: 22px;
    height: auto;
    border-radius: 2px;
}

.lang-dropdown .lang-item span {
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ================================================
   GALERÍA — single-product.php
   ================================================ */

.sp-gallery {
    position: sticky;
    top: 20px;
}

.sp-gallery__main {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 10px;
}

.sp-gallery__main-link {
    display: block;
    cursor: zoom-in;
}

.sp-gallery__main-img {
    width: 100%;
    height: auto;
    max-height: 70dvh;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #f9f9f9;
    transition: opacity 0.25s ease;
}

.sp-gallery__main-img--fade {
    opacity: 0.4;
}

/* Links ocultos para GLightbox — visually hidden */
.obra-lightbox-links {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    clip: rect(0,0,0,0);
}

.sp-gallery__hidden-link {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    clip: rect(0,0,0,0);
}

/* Flechas de GLightbox visibles también en móvil */
.gnext,
.gprev {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Strip de miniaturas */
.sp-gallery__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.sp-gallery__thumbs::-webkit-scrollbar {
    height: 4px;
}
.sp-gallery__thumbs::-webkit-scrollbar-track { background: transparent; }
.sp-gallery__thumbs::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.sp-gallery__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    background: #f5f5f5;
    cursor: pointer;
    overflow: hidden;
    border-radius: 3px;
    opacity: 0.55;
    transition: opacity 0.2s, border-color 0.2s;
}

.sp-gallery__thumb:hover {
    opacity: 0.85;
}

.sp-gallery__thumb.is-active {
    border-color: #111;
    opacity: 1;
}

.sp-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.sp-gallery__placeholder img {
    width: 100%;
    height: auto;
    display: block;
}

/* Badge de oferta */
.sp-gallery .onsale {
    background: #111;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
    top: 12px;
    left: 12px;
}


/* =========
 WEBSITE CSS
========== */


/* Header */

header{
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 100;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px !important;
}

header .inside-header{
    display: flex;
    flex-direction: row;
    align-items: center;
}

header .main-nav ul{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
}

header .main-nav ul a{
    color: var(--color-text) !important;
}

.header-actions{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin-left: 30px;
}

.header-actions .boton-contacto {
    background-color: var(--color-primary);
    color: #fff;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

/* Body */

/* GFORMS */

.gform_wrapper *{
    outline: none !important;
}

.gform_required_legend{
    display: none !important;
}

.particles-container {
  position: relative;
  width: 100%;
  
  /* ¡Cámbialo a lo que necesites! 50dvh, 500px, 80%, etc. */
  height: 600px; 
  
  overflow: hidden;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.grid-intro {
  position: relative;
  z-index: 2; /* Para que el texto se lea por encima de las partículas */
  padding: 0px 20px;
}

.grid-intro h1{
    text-align: center;
}

.grid-intro>h1 span{
    color: var(--color-primary);
    text-decoration: underline;
}

.grid-intro p{
    text-align: center;
}

/* Contenedor principal de los botones */
.app-versions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap; /* Hace que se adapte bien si la pantalla es muy estrecha */
}

/* Estilo del botón para la Web App */
.btn-web {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #016ce0; /* Tu azul original */
  color: #ffffff !important;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  height: 45px; /* Misma altura que suelen tener los botones de las stores */
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}


/* Contenedor base para los botones de las tiendas */
.btn-store.coming-soon {
  position: relative;
  display: inline-block;
  height: 45px; /* Forzamos la altura estándar de los badges de las tiendas */
  cursor: not-allowed; /* Cambia el cursor para indicar que no está disponible */
  border-radius: 8px;
  overflow: hidden;
}

/* Estilo de la imagen dentro del botón deshabilitado */
.btn-store.coming-soon img {
  height: 100%;
  width: auto;
  display: block;
  filter: brightness(0.6); /* Oscurece y difumina levemente la imagen de fondo */
}

/* Texto centrado "COMING SOON" */
.btn-store .overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Truco clave para centrar vertical y horizontalmente */
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  white-space: nowrap; /* Evita que el texto se parta en dos líneas */
  pointer-events: none; /* Hace que el texto sea invisible a los clics del ratón */
}

.grid-caracteristicas img{
    width: 40px;
}

.grid-caracteristicas::after,
.grid-caracteristicas::before{
    display: none !important;
}

.grid-caracteristicas .wpb_column{
    width: 100% !important;
}

.grid-caracteristicas {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
    margin-bottom: 20px;
}

.grid-caracteristicas .vc_column-inner {
    padding: 30px 20px !important;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
    background-color: #f9f9f9;
}

.grid-caracteristicas h3{
    color: var(--color-primary);
    font-size: 20px;
}

.boton a{
    background-color: var(--color-primary) !important;
    color: #fff !important;
    font-size: 14px !important; 
    padding: 12px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    border: 0px !important;
    font-weight: 600 !important;
}

.boton-blanco a{
    background-color: #fff !important;
    color: var(--color-primary) !important;
    font-size: 14px !important; 
    padding: 12px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    border: 0px !important;
}

.vc_tta-title-text{
    font-size: 16px !important;
}

.vc_tta-panel-title a{
    line-height: 1.2 !important;
}

.politica{
    padding-top: 40px !important;
    padding-bottom: 40px !important;
    max-width: 700px;
    margin: auto;
}

.politica h1{
    font-size: 32px !important;
}

.politica h2{
    font-size: 26px !important;
}

.politica h3{
    font-size: 22px !important;
}
/* Footer */

.site-footer{
    background-color: #f9f9f9;
    padding: 30px 20px;
}

.nautic-footer{
    max-width: var(--site_width);
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.logo-col-footer img{
    width: 180px;
}

.menu-footer{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    justify-content: center;
    text-align: center;
}

.menu-footer a{
    color: var(--color-text);
    font-size: 14px;
    transition: color 0.2s ease;
    text-decoration: unset;
    opacity: 0.8;
}

.legal-row-footer{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.legal-row-footer a{
    font-size: 13px;
}

.row-copyright-footer p{
    opacity: 0.7;
    margin: 0px;
    font-size: 12px;
}

/* Responsive */

.burger-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 12px;
    cursor: pointer;
    z-index: 10;
}

.burger-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-menu-toggle:checked ~ .header-actions .burger-menu-btn span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

#mobile-menu-toggle:checked ~ .header-actions .burger-menu-btn span:nth-child(2) {
    transform: translateY(-5px) rotate(-45deg);
}


.mobile-side-drawer {
    position: fixed;
    top: 0;
    left: 0; /* FIJO: Ya no se mueve de la pantalla */
    width: 100%;
    height: 100vh;
    z-index: 99999;
    display: flex;
    justify-content: flex-start;
    visibility: hidden; /* Oculto por defecto para que no bloquee clics */
    transition: visibility 0.4s;
}

/* Estado abierto del contenedor */
#mobile-menu-toggle:checked ~ .mobile-side-drawer {
    visibility: visible;
}

/* Capa oscura de fondo (Overlay) - APARECE LITERAL (FADE IN) */
.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0; /* Invisible al principio */
    transition: opacity 0.4s ease; /* Solo transiciona su opacidad, no se mueve */
    pointer-events: none;
}

#mobile-menu-toggle:checked ~ .mobile-side-drawer .drawer-overlay {
    opacity: 1; /* Se desvanece en su propio sitio */
    pointer-events: auto;
}

/* Contenedor blanco (Este es el único que viaja desde la izquierda) */
.drawer-content {
    position: relative;
    width: 280px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
    padding: 20px 30px;
    box-sizing: border-box;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow-y: auto;
    
    /* Lo escondemos usando transformaciones (más fluido para el móvil) */
    transform: translateX(-100%); 
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-content .menu{
    margin: 0 !important;
    list-style: none !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px !important;
    width: 100%;
}

.drawer-content .menu li{
    display: flex;
    width: 100%;
}
.drawer-content .menu a{
    padding: 8px 12px;
    background-color: #f9f9f9;
    border-radius: 4px;
    color: var(--color-primary);
    width: 100%;
    text-decoration: unset;
    font-size: 13px !important;
    text-align: left;
}
/* Al abrir, la caja blanca entra deslizándose */
#mobile-menu-toggle:checked ~ .mobile-side-drawer .drawer-content {
    transform: translateX(0);
}

.drawer-logo img {
    width: 160px;
}

.drawer-logo + div{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.contacto-lateral{
    background-color: var(--color-primary);
    color: #fff !important;
    font-size: 13px;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
    width: 100%;
    display: flex;
    margin-top: 10px;
}

@media (max-width: 1200px){
    .burger-menu-btn {
        display: inline-flex;
    }
    header .main-nav,
    .header-actions .boton-contacto{
        display: none;
    }

    .grid-intro h1{
        font-size: 28px;
    }
}

@media (max-width: 900px) {
    .sp-gallery {
        position: relative;
    }

    .sp-gallery .woocommerce-product-gallery {
        position: relative;
        top: auto;
    }

    .app-versions{
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .grid-caracteristicas{
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .grid-caracteristicas img{
        width: 30px;
    }

    .texto h2{
        font-size: 26px !important;
    }

    .politica h1, .texto h1{
        font-size: 28px !important;
    }

    .politica h2{
        font-size: 24px !important;
    }
}

@media (max-width: 600px){
    .drawer-content{
        width: 260px;
    }

    .grid-intro h1 br{
        display: none;
    }

    .menu-footer {
        gap: 10px;
    }
    .menu-footer a{
        font-size: 12px;
    }
    .legal-row-footer a,
    .row-copyright-footer p{
        font-size: 11px;
    }

    .site-header .header-image{
        width: 180px !important;
    }
}
