/* Estilos personalizados para el filtro Isaosa */

/* Forzar carga de Tailwind si no est�� disponible */
@import url('https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/3.4.0/tailwind.min.css');

@import url('https://fonts.googleapis.com/css2?family=Karla:ital,wght@0,200..800;1,200..800&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');

.isaosa-filter-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Forzar box-sizing en todo el contenedor */
    box-sizing: border-box;
}

.sidebar-filter__filter-title{
    font-family: "Work Sans" !important;
}

.isaosa-filter-container *,
.isaosa-filter-container *::before,
.isaosa-filter-container *::after {
    box-sizing: border-box;
}

/* Mejorar el aspecto de los checkboxes */
.category-checkbox:checked,
.tag-checkbox:checked {
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.dropdown-header .gap-2 path {
    fill: #00404F;
}

/* Efecto hover en las cards de productos */
.isaosa-filter-container article:hover {
    transform: translateY(-2px);
}

/* Line clamp para texto truncado */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Aspect ratio para im��genes */
.aspect-w-16 {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.aspect-w-16 > img,
.aspect-w-16 > div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Animaciones suaves */
.transition-all {
    transition: all 0.3s ease;
}

/* Mejoras para el scroll suave */
html {
    scroll-behavior: smooth;
}

/* Estilos para el modal m��vil */
@media (max-width: 1023px) {
    #desktop-filters {
        display: none !important;
    }
}

/* Loading spinner personalizado */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Mejoras de accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible para mejor accesibilidad */
button:focus-visible,
input:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Estilos para checkboxes personalizados */
input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Mejoras para la paginaci��n */
.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn[aria-current="page"] {
    font-weight: 600;
}

/* Estilos responsivos adicionales */
@media (max-width: 1023px) {
    .isaosa-filter-container {
        padding: 1rem;
    }
    
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Ajustar grid en m��vil */
    #products-grid {
        gap: 20px;
        display: flex;
        flex-wrap: wrap;
    }

    #products-grid article {
        width: calc(50% - 10px);
    }

    #mobile-filter-btn svg {
        width: 25px;
    }

    #mobile-filter-btn span {
        font-size: 20px;
    }

    aside.lg\:w-1\/4 {
        display: none !important;
    }

    button#mobile-filter-btn {
        background-color: #ffffff;
    }

    #mobile-filter-modal-content .items-center button {
        border: none !important;
        background-color: transparent;
    }

    #mobile-filter-modal-content .items-center button svg{
        stroke: #61d087 !important;
    }

    button#mobile-filter-btn:hover {
        background-color: #d3e9db;
    }

    #mobile-filter-modal-container{
        padding: 0;
        z-index: 9999999999;
        position: relative;
    }

    #mobile-filter-modal-content {
        width: 100%;
        max-height: 100vh; /* en lugar de height */
        margin: 0;
        overflow-y: auto;  /* permite scroll interno si hay demasiado contenido */
        -webkit-overflow-scrolling: touch; /* scroll suave en iOS */
        padding: 0 1rem; /* opcional, para que no quede pegado a los bordes */
    }
    
    #mobile-filter-modal-content .modal-header {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 10;
    }
    
    button.aplicar-filtros-mobile.flex-1.bg-blue-600.text-white.px-4.py-2.rounded-lg.hover\:bg-blue-700.transition-colors.font-semibold {
        margin-bottom: 50px;
    }

    .div-sin-productos-card {
        position: relative !important;
        width: 100% !important;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    #products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animaciones de entrada para las cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#products-grid article {
    animation: fadeInUp 0.5s ease-out;
}

/* Estilos para el estado de carga */
.opacity-50 {
    opacity: 0.5;
    pointer-events: none;
}

/* Mejoras para el modal */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Estilos para los emojis de frutas */
.fruit-emoji {
    font-size: 1.2em;
    line-height: 1;
}

/* Contador de productos en filtros */
.filter-count {
    font-size: 0.75rem;
    min-width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mejoras para la accesibilidad del color */
@media (prefers-reduced-motion: reduce) {
    .transition-all,
    .transition-colors,
    .transition-transform {
        transition: none;
    }
    
    .animate-spin {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Alto contraste para mejor legibilidad */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #374151 !important;
    }
    
    .text-gray-500 {
        color: #4b5563 !important;
    }
    
    .border-gray-300 {
        border-color: #6b7280 !important;
    }
}

/* ====================================
   TAILWIND CSS B�0�9SICO INLINE
   (Por si no carga desde CDN)
   ==================================== */

/* Reset b��sico */
.isaosa-filter-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Layout */
.max-w-7xl { max-width: 80rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Width & Height */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-12 { height: 3rem; }
.h-48 { height: 12rem; }
.h-64 { height: 16rem; }

/* Colores de fondo */
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-600 { 
    background-color: #D4FDE2;
    color: #002D33 !important;
    border-color: #30CB65;
}
.bg-green-500 { background-color: #10b981; }
.bg-red-500 { background-color: #ef4444; }
button.pagination-btn:hover {
    background-color: #D4FDE2 !important;
    color: #000000 !important;
}

/* Colores de texto */
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-white { color: #ffffff; }
.text-blue-600 { color: #2563eb; }

h2.text-xl.font-bold.mb-6.text-gray-800 {
    font-family: 'Work Sans';
    font-weight: 600;
    margin: 0;
    font-size: 28px;
}

.sidebar-filter__filter-title{
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.flex.items-center.justify-between {
    font-family: 'Work Sans';
    font-weight: 500;
    padding: 12px 17px 12px 0;
}

h3.text-lg.font-semibold.mb-4.text-gray-700.border-b.border-gray-200.pb-2 {
    font-family: 'Work Sans';
    font-weight: 600;
    font-size: 20px;
}

span.filter-text {
    font-family: 'Work Sans';
    font-weight: 500;
    font-size: 15px;
}

span.font-semibold.text-gray-800 {
    font-family: 'Work Sans';
    font-size: 15px;
    font-weight: 500;
    font-family: 'Work Sans';
    font-size: 15px;
    display: flex;
    gap: 10px;
    font-weight: 500;
    align-items: center;
    padding: 0 10px;
}


.dropdown-header.cursor-pointer.p-3.rounded-lg.border.border-gray-200.hover\:bg-gray-100.transition-colors {
    border-bottom: 2px solid #D5D5D5;
    border-radius: 0;
}

.stroke-selected-svg{
    stroke: #00404F;
}


aside.lg\:w-1\/4 {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 24px;
}

/* Tama�0�9os de texto */
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }

/* Font weight */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Border */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-gray-300 { border-color: #d1d5db; }
.border-gray-400 { border-color: #9ca3af; }
.border-blue-500 { border-color: #3b82f6; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Shadow */
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.hidden { display: none; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

/* Z-index */
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Transform */
.transform { transform: translateX(var(--tw-translate-x, 0)) translateY(var(--tw-translate-y, 0)) rotate(var(--tw-rotate, 0)) skewX(var(--tw-skew-x, 0)) skewY(var(--tw-skew-y, 0)) scaleX(var(--tw-scale-x, 1)) scaleY(var(--tw-scale-y, 1)); }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }

/* Hover states */
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-blue-600:hover { background-color: #2563eb; }
.hover\:text-blue-600:hover { color: #2563eb; }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }



.shadow-cards{
    border: 1px solid #d6d6d6;
}

.shadow-cards:hover{
    border: 1px solid #6cec71;
}

.title-card-filter{
    font-size: 24px;
    color: #00404F;
    font-weight: 600;
    font-family: 'Work Sans';
}

#results-count{
    color: #002D33;
    font-family: "Work Sans";
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
}

#sidebar-filter{
    margin-top: 45px;
}

.option-filter-label{
    padding: 10px 0;
    border-bottom: 2px solid #f4f4f4;
    display: flex;
    gap: 10px;
}

.option-filter-label span{
    color: #002D33;
    font-family: "Work Sans";
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: 22px;
}

/* Responsive classes */
@media (min-width: 640px) {
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .md\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:flex-row { flex-direction: row; }
    .md\:space-x-4 > * + * { margin-left: 1rem; }
    .md\:space-y-0 > * + * { margin-top: 0; }
}

@media (min-width: 1024px) {
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .lg\:flex-row { flex-direction: row; }
    .lg\:w-1\/4 { width: 25%; }
    .lg\:w-3\/4 { width: 75%; }
    .lg\:block { display: block; }
    .lg\:hidden { display: none; }
}

@media (min-width: 1280px) {
    .xl\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .xl\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}





/* Ocultar todos los checkboxes */
.category-checkbox,
.tag-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none; /* si no quieres que sean clickeables directamente */
}

/* Actualizar estilos base para los labels */
.option-filter-label {
    position: relative;
    padding: 16px 10px;
    border-bottom: 2px solid #D5D5D5;
    display: flex;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #ffffff;
    align-items: center;
    justify-content: space-between;
}

/* Estado hover */
.option-filter-label:hover {
    transform: translateX(2px);
}


.label-todos-productos{
    border-top: 2px solid #D5D5D5;
}

.selected-dropdown-filter{
    background-color: #F0FFF5 !important;
}

/* Clase que se agregará via JavaScript cuando esté seleccionado */
.option-filter-label.selected {
    background-color: #F0FFF5;
}


.filter-cultivos .option-filter-label-cultivos.selected {
    background-color: #ffffff !important;
    border: 1px solid #6dec97;
}

.filter-bar1-div{
    padding: 15px;
}

.space-y-3.filter-cultivos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Contenedor del texto y emoji */
.option-filter-label .label-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Color del texto cuando está seleccionado */
.option-filter-label.selected span {
    font-weight: 600 !important;
}

/* Icono SVG para la flecha/check */
.option-filter-label .check-icon {
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    width: 16px;
    height: 16px;
    color: #228B22;
    margin-left: auto;
    flex-shrink: 0;
    display: none;
}

button.pagination-btn.px-4.py-2.text-blue-600.border.border-blue-600.rounded-lg.hover\:bg-blue-50.transition-colors {
    border-color: #BEBEBE;
}

.option-filter-label.selected .check-icon {
    opacity: 1;
    transform: scale(1);
}

/* Contador de productos - ajustar cuando esté seleccionado */
.option-filter-label.selected .bg-gray-100 {
    background-color: #d4edda !important;
    color: #0f4f0f !important;
    font-weight: 600;
}

/* Efectos de animación adicionales */
.option-filter-label {
    overflow: hidden;
}

.option-filter-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(240, 255, 245, 0.4),
        transparent
    );
    transition: left 0.5s ease;
}

.option-filter-label:hover::before {
    left: 100%;
}

/* Estados de focus para accesibilidad */
.option-filter-label:focus-visible {
    outline: 2px solid #228B22;
    outline-offset: 2px;
}

.filter-cultivos{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}


#isaosa-search-form{
    display: flex;
}

.option-filter-label-cultivos{
    border-radius: 30px;
    border: 1px solid #D9D9D9;
    padding: 12px 10px;
}

.isaosa-search-form__div{
    width: 70%;
}

label.option-filter-label {
    padding-right: 15px;
    width: auto;
}

.isaosa-search-form__div-input{
    border: 1px solid #ffffff !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.isaosa-search-form__button{
    width: 30% !important;
    background-color: #30CB65 !important;
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border: 1px solid #30CB65 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
}

.aplicar-filtros-mobile:hover {
    background: #bcedcd;
}

div#mobile-filters-content-cultivos {
    padding: 20px 20px 20px 20px;
    margin-top: 40px;
}

.a-icon-category-parent-card{
    position: relative;
}


.div-icon-category-parent-card{
    position: absolute;
    right: 10px;
    top: 10px;
}

.div-loading-cards{
    color: #002D33;
    font-family: "Work Sans";
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
}

footer.elementor.elementor-167.elementor-location-footer {
    z-index: -1;
    position: relative;
}

.div-sin-productos-card{
    position: absolute;
    width: 80%;
}

/* Responsivo para labels personalizados */
@media (max-width: 768px) {
    .option-filter-label {
        padding: 10px 12px;
    }
    
    .option-filter-label span {
        font-size: 14px !important;
        line-height: 20px !important;
    }
}