/* Explore Products Marketplace Styles */

.explore-section {
    position: relative;
    overflow: visible !important;
}

.explore-brand-bg {
    position: absolute;
    top: 5%;
    right: -10%;
    width: 600px;
    height: 600px;
    opacity: 0.02;
    transform: rotate(-20deg);
    pointer-events: none;
    z-index: -1;
}

.explore-brand-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

/* 
@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
} 
*/
li.country-flag-item {
    margin-top: -6px;
}
.product-card {
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: visible; /* Permitir que los tooltips se vean fuera de la tarjeta */
    position: relative;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    padding: 0 !important;
    width: 100%; /* Asegurar que ocupe todo el ancho de la celda */
}

.product-card header {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    aspect-ratio: 1;
    position: relative;
}

.product-card header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.product-card:hover header img {
    transform: scale(1.05);
}

/* Restaurar el espacio para el contenido y los botones */
.product-card > div,
.product-info {
    padding: 1rem 1rem 0.75rem 1rem !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card > footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem !important;
    background: transparent;
    border-top: none; /* Quitamos el borde directo que se salía */
    position: relative;
}

/* Línea divisoria elegante que no se sale de los bordes redondeados */
.product-card > footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background-color: var(--pico-muted-border-color);
    opacity: 0.8;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.product-card:hover .external-link-btn,
.product-card:hover .quick-view-btn {
    opacity: 1 !important;
}

/* Handshake Badge */
.handshake-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    z-index: 10;
    cursor: help;
    border-bottom: none !important; /* Forzar quitar el punto de Pico CSS */
    text-decoration: none !important;
}

.handshake-badge i {
    color: #27ae60;
    font-size: 1.1rem;
}

.store-badge {
    color: #ffffff !important;
    background-color: var(--pico-primary) !important;
    padding: 0.2rem 0.75rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.7rem;
    display: inline-block;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

.category-chip {
    transition: all 0.2s ease;
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    white-space: nowrap;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--pico-primary) !important;
    color: var(--pico-primary) !important;
    background: transparent;
}

.category-chip:hover {
    background: var(--pico-primary);
    color: #fff !important;
    border-color: var(--pico-primary);
}

.category-chip.active, 
.category-chip:not(.outline) {
    background: var(--pico-primary) !important;
    color: #fff !important;
    border-color: var(--pico-primary) !important;
}

.pagination ul li {
    margin-bottom: 0;
}

#infinite-scroll-loader {
    text-align: center;
    padding: 2rem;
}

/* Estilos Nube de Etiquetas Dinámica */
.tag-cloud-container {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding: 1rem 0; /* Full width feel inside container */
    background: transparent;
    text-align: center;
    overflow: hidden; /* Hide overflow for marquee */
    position: relative;
}

.tag-cloud-title {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--pico-color);
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Marquee Container */
.tag-marquee-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    padding-top: 10px;
}

.tag-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    will-change: transform;
}

/* Animation Definitions */
.animate-left {
    animation: scroll-left 60s linear infinite;
}

.animate-right {
    animation: scroll-right 60s linear infinite;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Pause on hover */
.tag-marquee-wrapper:hover .tag-track {
    animation-play-state: paused;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    /* High contrast style by default */
    background-color: var(--pico-card-background-color);
    color: var(--pico-color); 
    border: 1px solid var(--pico-muted-border-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tag-item i {
    margin-right: 0.5rem;
    font-size: 0.8em;
    opacity: 0.6;
}

.tag-item:hover {
    background-color: var(--pico-primary);
    color: #ffffff;
    border-color: var(--pico-primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(var(--pico-primary-rgb), 0.3);
    text-decoration: none;
    z-index: 10;
}

.tag-item.active {
    background-color: var(--pico-primary);
    color: #ffffff;
    border-color: var(--pico-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Header Styles */
.explore-header {
    margin-bottom: 3rem;
    text-align: center;
    padding-top: 2rem;
}

.explore-header h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    font-weight: 800;
}

.explore-header p {
    color: var(--pico-muted-color);
    font-size: 1.1rem;
}

@media (max-width: 576px) {
    .explore-header h1 {
        font-size: 1.8rem;
    }
    .explore-header p {
        font-size: 1rem;
    }
}

/* Estilos de Filtros Responsive */
.search-filters {
    margin-bottom: 3rem;
}

.search-filters-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: end;
}

@media (min-width: 576px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 850px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr 1.5fr auto;
        gap: 0.75rem;
    }
}

.filter-item label {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    display: block;
    color: var(--pico-muted-color);
    font-weight: 600;
}

.filter-item input,
.filter-item select {
    margin-bottom: 0 !important;
    border-radius: 10px !important;
    height: 50px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 2.8rem !important;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pico-muted-color);
    pointer-events: none;
    font-size: 1.1rem;
}

.filter-action button {
    margin-bottom: 0;
    border-radius: 10px;
    height: 50px;
    padding: 0 2rem;
    font-weight: 600;
    width: 100%;
}

@media (min-width: 850px) {
    .filter-action button {
        width: auto;
    }
}

/* Categorías */
.categories-container {
    margin-top: 2.5rem;
}

.categories-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 1rem;
    scrollbar-width: none;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .categories-scroll {
        justify-content: center;
        flex-wrap: wrap;
    }
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

/* Ocultar icono nativo de búsqueda */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

/* Ensure no background image (like from Pico CSS) shows up */
input[type="search"] {
    background-image: none !important;
}
