/* =============================================================================
   CATÁLOGO PÚBLICO — estilos extraídos de catalog_public.html (U3 Área 1 S182)
   Mundo público (base_public.html + theme.css); NO usa el design-system.
   Tokens: --inducop-*, --gray-*, --color-* (vocabulario de theme.css).
   Pliego S181 Área 1: <style> inline -> archivo dedicado; hero moderno
   (.catalog-public-hero con omnibox + chips); de-hardcode #f0f9ff/#e0f2fe.
   ============================================================================= */

/* Hero del catálogo público — el barrido degradado lo aporta la clase compartida
   .public-hero-sweep (SSOT en public-hero.css, S194). Aquí solo el layout. */
.catalog-public-hero {
    position: relative;      /* ancla el overlay .at-constellation-pattern (S195) */
    overflow: hidden;        /* recorta la malla de constelacion al area del heroe */
    padding: 3rem 0;
    margin-bottom: 2rem;
}
/* El contenido del heroe (omnibox, chips) va SOBRE la marca de agua de constelacion (S195). */
.catalog-public-hero > .container {
    position: relative;
    z-index: 1;
}

/* Omnibox: barra de búsqueda prominente */
.catalog-public-hero-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 640px;
    margin-top: 1.5rem;
    padding: 0.35rem 0.35rem 0.35rem 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.catalog-public-hero-search > i {
    flex-shrink: 0;
    color: var(--inducop-cyan);
    font-size: 1.15rem;
}

.catalog-public-hero-search input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.25rem;
    border: none;
    outline: none;
    background: transparent;
    font-size: var(--text-base);
    color: var(--inducop-dark);
}

.catalog-public-hero-search button {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Chips de categoría (quick-filter) */
.catalog-public-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.catalog-public-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.catalog-public-chip:hover {
    background: rgba(255, 255, 255, 0.28);
    color: white;
}

.catalog-public-chip.is-active {
    background: white;
    color: var(--inducop-navy);
    border-color: white;
}

@media (max-width: 576px) {
    .catalog-public-hero-search { flex-wrap: wrap; }
    .catalog-public-hero-search button { width: 100%; }
}

/* Card de producto (pliego: molécula de producto, nombre público) */
.catalog-public-card {
    position: relative;      /* ancla el acento .at-constellation-pattern--corner (S195) */
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.catalog-public-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--inducop-cyan);
}

.product-image-wrapper {
    position: relative;
    /* de-hardcode #f0f9ff/#e0f2fe -> tint derivado del token de marca (S182) */
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--inducop-cyan) 6%, white) 0%,
        color-mix(in srgb, var(--inducop-cyan) 12%, white) 100%);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Marca de agua INDUCOP (3 disenos rotados por card; mask, gris fijo light-only) */
.product-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--gray-400);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 62%;
    mask-size: 62%;
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
}
.product-image-wrapper--wm-seal::before { -webkit-mask-image: url('../images/inducop_wm_seal.png'); mask-image: url('../images/inducop_wm_seal.png'); }
.product-image-wrapper--wm-constellation::before { -webkit-mask-image: url('../images/inducop_wm_constellation.png'); mask-image: url('../images/inducop_wm_constellation.png'); }
.product-image-wrapper--wm-full::before { -webkit-mask-image: url('../images/inducop_wm_full_logo.png'); mask-image: url('../images/inducop_wm_full_logo.png'); }

/* Placeholder (icono sin imagen) sobre la marca de agua */
.product-image-wrapper > .bi {
    position: relative;
    z-index: 1;
}

/* Badge de categoria glass (esquina superior-izquierda, sobre la imagen) */
.catalog-public-card__cat {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: calc(100% - 20px);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--inducop-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-image {
    position: relative;
    z-index: 1;
    max-width: 80%;
    max-height: 180px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.catalog-public-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: var(--inducop-lime);
    color: var(--inducop-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.product-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    color: var(--inducop-cyan);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--inducop-navy);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-description {
    color: var(--gray-600);
    font-size: var(--text-sm);
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.product-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--text-xs);
    color: var(--gray-500);
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

/* Filtros */
.filter-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--inducop-navy);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-option:hover {
    background: var(--gray-50);
}

.filter-option input[type="checkbox"] {
    cursor: pointer;
}

/* Búsqueda (sidebar móvil) */
.search-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: var(--text-base);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--inducop-cyan);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}
