@import url(global.css);

body {
    background-image: none;
    background-color: white;
    overflow-x: hidden;
}

.footer__copy,
.footer__country {
    color: #6b7385;
}

.catalog-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5em 1.5em 0;
}

.catalog-hero__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
    padding-bottom: 1.8em;
    border-bottom: 1px solid #e3e6f0;
}

.catalog-hero h1 {
    font-size: 1.6em;
    font-weight: 800;
    color: #1c2536;
    line-height: 1.2;
}

.catalog-hero h1 em {
    font-style: normal;
    color: #1c2536;
}

.catalog-hero__controls {
    display: flex;
    align-items: center;
    gap: 0.8em;
}

.catalog-filter {
    position: relative;
}

.catalog-filter__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.7em;
    padding: 0.7em 1.2em;
    border-radius: 999px;
    border: none;
    background-color: #eef1fa;
    color: #8890a3;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 200ms ease;
}

.catalog-filter__trigger:hover {
    background-color: #e4e8f6;
}

.catalog-filter__trigger span {
    color: #40495c;
    font-weight: 600;
    font-size: 0.9em;
}

.catalog-filter__chevron {
    font-size: 0.8em;
    transition: transform 200ms ease;
}

.catalog-filter.is-open .catalog-filter__chevron {
    transform: rotate(180deg);
}

.catalog-filter__menu {
    position: absolute;
    top: calc(100% + 0.5em);
    right: 0;
    min-width: 180px;
    background-color: white;
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(20, 30, 60, 0.14);
    padding: 0.5em;
    list-style: none;
    z-index: 20;
}

.catalog-filter__option {
    padding: 0.6em 0.9em;
    border-radius: 10px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.catalog-filter__option:hover {
    background-color: #eef1fa;
}

.catalog-filter__option.is-active {
    background-color: var(--primary-color);
    color: white;
}

.catalog-filters__search {
    display: flex;
    align-items: center;
    gap: 0.7em;
    background-color: #eef1fa;
    border-radius: 999px;
    padding: 0.7em 1.2em;
    width: 220px;
    color: #8890a3;
}

.catalog-filters__search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: #40495c;
    font-size: 0.9em;
}

.catalog-filters__search input::placeholder {
    color: #9aa2b3;
}

/* Estado de carga del server island (ver CatalogGrid.astro) mientras se
   espera la respuesta del CRM. */
.catalog-loading {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6em 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8em;
    color: #6b7385;
    font-weight: 600;
}

.catalog-loading i {
    color: var(--primary-color);
    font-size: 1.3em;
}

/* Grid de productos */
.catalog-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5em 1.5em 5em;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8em;
}

.catalog-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e3e6f0;
    box-shadow: 0 10px 25px rgba(20, 30, 60, 0.08);
    transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}

.catalog-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 16px 32px rgba(20, 30, 60, 0.14);
}

.catalog-card__media {
    height: 260px;
}

.catalog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-card__body {
    padding: 1.3em 1.5em 1.5em;
}

.catalog-card__title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.6em;
}

.catalog-card__title-row h3 {
    font-size: 1.25em;
    font-weight: 700;
    color: #1c2536;
}

.catalog-card__price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.15em;
    white-space: nowrap;
}

.catalog-card__price small {
    font-weight: 500;
    font-size: 0.65em;
    color: #8890a3;
}

.catalog-card__desc {
    margin-top: 0.5em;
    color: #6b7385;
    font-size: 0.9em;
    line-height: 1.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-card hr {
    border: none;
    height: 1px;
    background-color: #ececf3;
    margin: 1em 0;
}

.catalog-card__meta {
    display: flex;
    justify-content: space-between;
}

.catalog-card__meta span {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7em;
    color: #9aa2b3;
    margin-bottom: 0.3em;
}

.catalog-card__meta strong {
    color: #14181f;
    font-size: 0.9em;
}

.mensaje-error {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5em 3em;
    text-align: center;
    color: #6b7385;
}

@media (max-width: 900px) {
    .catalog-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .catalog-hero__row {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-hero__controls {
        flex-direction: row;
        align-items: center;
    }

    .catalog-filters__search {
        width: auto;
        flex: 1;
        min-width: 0;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }
}
