@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Ubuntu:wght@400;500;700&display=swap');

/* Global Font Settings, Strict Viewport Lock & Smooth Rendering */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative !important;
}

html, body, .font-sans {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

/* Ocultar submenús absolutos de escritorio en dispositivos móviles para evitar desbordamiento del lienzo */
@media (max-width: 1023px) {
    .submenu, #dynamic-submenu {
        display: none !important;
    }
}

/* Premium Selection Highlighter */
::selection {
    background-color: #10b981;
    color: #ffffff;
}

/* Customized Slim Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Glassmorphism Styles */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-panel-dark {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Modern Card Hover Effects */
.rynk-card {
    background: #ffffff;
    border: 2.5px solid #94a3b8; /* Más ancho (2.5px) y oscuro para visibilidad perfecta */
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
}

.rynk-card:hover {
    transform: translateY(-6px);
    border-color: #10b981;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

/* Compatibility support for .product-card */
.product-card {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: #10b981;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
}

/* Elegant Focus Ring Styles */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

/* Glow Button Animation */
.btn-glow {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glow:hover {
    box-shadow: 0 0 22px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

/* Smooth Slide-Up Transition */
.animate-slide-up {
    animation: slideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   RYNK CUSTOM GLOBAL & MOBILE SEARCH BAR STYLES
   ========================================================================== */
.global-search-container {
    position: relative;
    display: none; /* hidden by default */
}

@media (min-width: 1024px) {
    .global-search-container {
        display: block !important; /* lg:block */
        width: 12rem; /* w-48 */
    }
}
@media (min-width: 1280px) {
    .global-search-container {
        width: 16rem; /* xl:w-64 */
    }
}

.global-search-container input {
    width: 100% !important;
    font-size: 11px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 8px 12px 8px 32px !important;
    outline: none !important;
    background-color: rgba(249, 250, 251, 0.5) !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
    color: #111827 !important;
}

.global-search-container input:hover {
    background-color: #ffffff !important;
}

.global-search-container input:focus {
    border-color: #10b981 !important; /* focus:border-green-600 */
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.global-search-container i {
    position: absolute !important;
    left: 12px !important; /* left-3 */
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #9ca3af !important;
    font-size: 12px !important;
    pointer-events: none;
}

.mobile-search-container {
    position: relative;
    width: 100% !important;
    margin-bottom: 8px; /* mb-2 */
}

.mobile-search-container input {
    width: 100% !important;
    font-size: 12px !important; /* text-xs */
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important; /* rounded-xl */
    padding: 10px 16px 10px 36px !important; /* py-2.5, px-4, pl-9 */
    outline: none !important;
    background-color: rgba(249, 250, 251, 0.5) !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
    color: #111827 !important;
}

.mobile-search-container input:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.mobile-search-container i {
    position: absolute !important;
    left: 14px !important; /* left-3.5 */
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #9ca3af !important;
    font-size: 12px !important;
    pointer-events: none;
}

/* Mobile Search Container custom styling */
.mobile-search-container-fixed {
    display: block !important;
}

@media (min-width: 1024px) {
    .mobile-search-container-fixed {
        display: none !important;
    }
}

/* Custom class for the Rynk Official badge with glassmorphism and green text */
.rynk-oficial-badge {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    color: #15803d !important;
    border: 1px solid rgba(22, 163, 74, 0.25) !important;
    font-size: 10px !important;
    padding: 3px 9px !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06) !important;
}

/* Custom class for the Reseller badge with glassmorphism and white text */
.rynk-reseller-badge {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-size: 10px !important;
    padding: 3px 9px !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}

/* Custom class for marketing/promotional tags */
.rynk-marketing-badge {
    font-size: 10px !important;
    padding: 3px 9px !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em;
    border-radius: 6px !important;
    text-transform: uppercase;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    border: none !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
    color: #ffffff !important;
}

/* Floating overlay container for top micro-badges (removes heavy dark gradient) */
.rynk-card-image-gradient {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 10px !important;
    background: transparent !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.rynk-card-image-gradient > * {
    pointer-events: auto !important;
}

/* Scrollbar hiding helper */
.scrollbar-none::-webkit-scrollbar {
    display: none !important;
}
.scrollbar-none {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Slider de Destacados */
#products-slider {
    display: flex !important;
    gap: 1.5rem !important; /* gap-6 */
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    scroll-snap-type: x mandatory !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    align-items: stretch !important; /* Para que todas tengan la misma altura */
}

/* Ocultar scrollbar de destacados */
#products-slider::-webkit-scrollbar {
    display: none !important;
}

/* Ancho exacto de las tarjetas para que no se estiren */
#products-slider > div {
    width: calc((100% - 4.5rem) / 4) !important; /* 4 columnas exactas en pantallas de escritorio */
    flex-shrink: 0 !important;
    scroll-snap-align: start !important;
}

@media (max-width: 767px) {
    #products-slider > div {
        width: calc((100% - 1.5rem) / 2) !important; /* 2 columnas en tablets */
    }
}

@media (max-width: 639px) {
    #products-slider > div {
        width: 100% !important; /* 1 columna en móviles */
    }
}

/* Botones de navegación lateral flotantes y siempre visibles */
#featured-prev, #featured-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 3.25rem !important; /* 52px */
    height: 3.25rem !important; /* 52px */
    border-radius: 9999px !important;
    background: rgba(15, 23, 42, 0.9) !important; /* Slate oscuro de alto contraste */
    border: 1.5px solid rgba(16, 185, 129, 0.4) !important; /* Borde verde esmeralda sutil */
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 30 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
}

#featured-prev {
    left: -1.625rem !important; /* Centrado en el borde izquierdo */
}

#featured-next {
    right: -1.625rem !important; /* Centrado en el borde derecho */
}

#featured-prev:hover, #featured-next:hover {
    background: #10b981 !important; /* Fondo verde esmeralda al pasar el cursor */
    border-color: #34d399 !important;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.7) !important;
    transform: translateY(-50%) scale(1.05) !important;
}

#featured-prev:disabled, #featured-next:disabled {
    opacity: 0.25 !important;
    cursor: not-allowed !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(15, 23, 42, 0.5) !important;
    box-shadow: none !important;
    transform: translateY(-50%) scale(1) !important;
}

/* Indicadores de paginación (puntitos) de alta visibilidad */
#products-pagination button {
    width: 10px !important;
    height: 10px !important;
    border-radius: 99px !important;
    background: rgba(15, 23, 42, 0.25) !important; /* Gris slate oscuro semi-transparente para inactivos */
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#products-pagination button:hover {
    background: rgba(15, 23, 42, 0.45) !important;
}

/* Punto activo estirado y de color verde corporativo brillante */
#products-pagination button.active-dot {
    width: 24px !important;
    background: #16a34a !important;
    box-shadow: 0 0 12px rgba(22, 163, 74, 0.5) !important;
}

/* Transition utility helper classes for custom modals when Tailwind is removed */
.opacity-0 { opacity: 0 !important; }
.opacity-100 { opacity: 1 !important; }
.scale-90 { transform: scale(0.9) !important; }
.scale-95 { transform: scale(0.95) !important; }
.scale-100 { transform: scale(1) !important; }
.transition-all { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; }
.duration-300 { transition-duration: 300ms !important; }
.duration-200 { transition-duration: 200ms !important; }

/* Tailwind-to-Bootstrap Compatibility Utility Bridges */
.w-full { width: 100% !important; }
.h-full { height: 100% !important; }
.h-52 { height: 13rem !important; }
.h-60 { height: 15rem !important; }
.h-64 { height: 16rem !important; }
.aspect-square { aspect-ratio: 1 / 1 !important; }
.aspect-video { aspect-ratio: 16 / 9 !important; }
.line-clamp-2 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
.line-clamp-3 {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
.border-b-2 { border-bottom: 2px solid !important; }
.border-t-2 { border-top: 2px solid !important; }
.border-slate-200 { border-color: #cbd5e1 !important; }
.bg-gray-50 { background-color: #f9fafb !important; }
.bg-slate-50 { background-color: #f8fafc !important; }
.p-6 { padding: 1.5rem !important; }
.flex-grow { flex-grow: 1 !important; }

/* Scroll Reveal animation classes */
.reveal-on-scroll {
    opacity: 0 !important;
    transform: translateY(30px) !important;
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.reveal-on-scroll.revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}