/* =========================================================
   COVEMA 2026 · CATÁLOGO AUTOS NUEVOS
   Inspirado en la maqueta entregada, manteniendo identidad Covema.
   ========================================================= */

body.post-type-archive-product .page-title,
body.post-type-archive-product .shop-loop-before,
body.post-type-archive-product .shop-loop-after,
body.post-type-archive-product .sidebar-content,
body.post-type-archive-product .main-content > .woocommerce-notices-wrapper + .page-title {
    display: none !important;
}

body.post-type-archive-product .main-content,
body.post-type-archive-product #main.wide,
body.post-type-archive-product .main-content-wrap {
    padding-top: 0 !important;
}

.covema-catalog {
    --catalog-ink: #151821;
    --catalog-muted: #6e7382;
    --catalog-border: #e3e6ed;
    --catalog-soft: #f5f7fb;
    --catalog-primary: var(--primary-color, #292e6d);
    --catalog-accent: var(--tertiary-color, #0074e9);
    background: #fff;
    color: var(--catalog-ink);
    padding: 42px 0 96px;
}

.covema-catalog__container {
    max-width: 1240px;
}

.covema-catalog-hero {
    max-width: 720px;
    margin: 0 auto 34px;
    text-align: center;
}

.covema-catalog-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--catalog-primary);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.covema-catalog-hero h1 {
    margin: 0 0 12px;
    color: var(--catalog-ink);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.03;
}

.covema-catalog-hero p {
    max-width: 620px;
    margin: 0 auto;
    color: var(--catalog-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.covema-filter-panel {
    position: relative;
    z-index: 2;
    margin-bottom: 26px;
    padding: 24px;
    border: 1px solid var(--catalog-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 44px rgba(25, 34, 66, .07);
}

.covema-filter-heading {
    margin-bottom: 11px;
    color: var(--catalog-ink);
    font-size: .84rem;
    font-weight: 700;
}

.covema-brand-options {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.covema-brand-chip {
    min-height: 64px;
    padding: 11px 14px;
    border: 1px solid var(--catalog-border);
    border-radius: 13px;
    background: #fff;
    color: var(--catalog-ink);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.covema-brand-chip:hover {
    border-color: rgba(41, 46, 109, .45);
    transform: translateY(-2px);
}

.covema-brand-chip.is-active {
    border-color: var(--catalog-primary);
    background: rgba(41, 46, 109, .045);
    box-shadow: inset 0 0 0 1px var(--catalog-primary);
}

.covema-brand-chip__logo {
    display: block;
    width: auto;
    max-width: 98px;
    height: 28px;
    margin: auto;
    object-fit: contain;
}

.covema-filter-secondary {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
    gap: 14px;
    align-items: end;
    margin-top: 19px;
    padding-top: 19px;
    border-top: 1px solid var(--catalog-border);
}

.covema-filter-group label {
    display: block;
    margin: 0 0 7px;
    color: var(--catalog-ink);
    font-size: .8rem;
    font-weight: 700;
}

.covema-filter-select {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 42px 0 14px;
    border: 1px solid var(--catalog-border);
    border-radius: 11px;
    background-color: #fff;
    color: var(--catalog-ink);
    font-size: .9rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.covema-filter-select:focus {
    border-color: var(--catalog-primary);
    box-shadow: 0 0 0 3px rgba(41, 46, 109, .09);
}

.covema-filter-reset {
    height: 48px;
    padding: 0 17px;
    border: 0;
    border-radius: 11px;
    background: var(--catalog-soft);
    color: var(--catalog-ink);
    cursor: pointer;
    font-size: .83rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}

.covema-filter-reset:hover {
    background: var(--catalog-primary);
    color: #fff;
}

.covema-catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 17px;
}

.covema-catalog-count {
    display: flex;
    gap: 5px;
    margin: 0;
    color: var(--catalog-muted);
    font-size: .9rem;
}

.covema-catalog-count strong {
    color: var(--catalog-ink);
}

.covema-catalog-results {
    position: relative;
    min-height: 300px;
}

.covema-catalog.is-loading .covema-catalog-results::after {
    position: absolute;
    inset: 0;
    z-index: 5;
    content: '';
    border-radius: 16px;
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(2px);
}

.covema-catalog.is-loading .covema-catalog-results::before {
    position: absolute;
    top: 95px;
    left: 50%;
    z-index: 6;
    width: 38px;
    height: 38px;
    margin-left: -19px;
    content: '';
    border: 3px solid rgba(41, 46, 109, .15);
    border-top-color: var(--catalog-primary);
    border-radius: 50%;
    animation: covemaCatalogSpin .75s linear infinite;
}

@keyframes covemaCatalogSpin {
    to { transform: rotate(360deg); }
}

.covema-catalog-grid.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

.covema-catalog-grid.products::before,
.covema-catalog-grid.products::after {
    display: none !important;
}

.covema-catalog-grid .covema-vehicle-card-item.product {
    float: none !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.covema-vehicle-card {
    display: flex;
    height: 100%;
    min-height: 390px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--catalog-border);
    border-radius: 14px;
    background: #fff;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.covema-vehicle-card:hover {
    border-color: #cfd4df;
    transform: translateY(-5px);
    box-shadow: 0 18px 42px rgba(20, 27, 53, .11);
}

.covema-vehicle-card__image-link {
    position: relative;
    display: block;
    min-height: 225px;
    color: inherit;
    text-decoration: none !important;
}

.covema-vehicle-card__brand {
    position: absolute;
    top: 17px;
    left: 17px;
    z-index: 2;
    display: flex;
    min-width: 58px;
    min-height: 26px;
    align-items: center;
    color: #454a57;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.covema-vehicle-card__brand-logo {
    width: auto;
    max-width: 82px;
    height: 25px;
    object-fit: contain;
}

.covema-vehicle-card__figure {
    display: flex;
    height: 225px;
    margin: 0;
    padding: 45px 18px 12px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

.covema-vehicle-card__figure img,
.covema-vehicle-card__image {
    display: block;
    width: 100% !important;
    max-width: 245px !important;
    height: 155px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    transition: transform .3s ease;
}

.covema-vehicle-card:hover .covema-vehicle-card__image {
    transform: scale(1.035);
}

.covema-vehicle-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 19px 17px;
}

.covema-vehicle-card__title {
    margin: 0 0 8px;
    color: var(--catalog-ink);
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
}

.covema-vehicle-card__title a {
    color: inherit !important;
    text-decoration: none !important;
}

.covema-vehicle-card__price {
    display: flex;
    min-height: 44px;
    flex-direction: column;
    margin-bottom: 15px;
    color: var(--catalog-muted);
}

.covema-vehicle-card__price span {
    font-size: .74rem;
}

.covema-vehicle-card__price strong {
    margin-top: 1px;
    color: var(--catalog-ink);
    font-size: 1rem;
    font-weight: 700;
}

.covema-vehicle-card__price .woocommerce-Price-currencySymbol {
    font-size: inherit;
}

.covema-vehicle-card__cta {
    display: flex;
    margin-top: auto;
    padding-top: 14px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #edf0f4;
    color: var(--catalog-ink) !important;
    font-size: .83rem;
    font-weight: 600;
    text-decoration: none !important;
}

.covema-vehicle-card__arrow {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--catalog-soft);
    color: var(--catalog-primary);
    font-size: 1rem;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.covema-vehicle-card:hover .covema-vehicle-card__arrow {
    background: var(--catalog-primary);
    color: #fff;
    transform: translateX(2px);
}

.covema-catalog-pagination {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    margin-top: 38px;
}

.covema-page {
    display: inline-flex;
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--catalog-border);
    border-radius: 10px;
    background: #fff;
    color: var(--catalog-ink);
    cursor: pointer;
    font-size: .88rem;
    font-weight: 700;
    transition: .2s ease;
}

.covema-page:hover,
.covema-page.is-active {
    border-color: var(--catalog-primary);
    background: var(--catalog-primary);
    color: #fff;
}

.covema-page-dots {
    padding: 0 4px;
    color: var(--catalog-muted);
}

.covema-catalog-empty {
    padding: 70px 20px;
    border: 1px dashed #d9dde6;
    border-radius: 18px;
    background: var(--catalog-soft);
    text-align: center;
}

.covema-catalog-empty__icon {
    display: block;
    margin-bottom: 10px;
    color: var(--catalog-primary);
    font-size: 2rem;
}

.covema-catalog-empty h3 {
    margin: 0 0 6px;
    color: var(--catalog-ink);
    font-size: 1.15rem;
}

.covema-catalog-empty p {
    margin: 0;
    color: var(--catalog-muted);
}

@media (max-width: 1100px) {
    .covema-brand-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .covema-filter-secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .covema-filter-reset {
        width: 100%;
    }

    .covema-catalog-grid.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .covema-catalog {
        padding: 28px 0 62px;
    }

    .covema-catalog-hero {
        margin-bottom: 24px;
        padding: 0 8px;
    }

    .covema-catalog-hero h1 {
        font-size: 2rem;
    }

    .covema-catalog-hero p {
        font-size: .94rem;
    }

    .covema-filter-panel {
        padding: 16px;
        border-radius: 15px;
    }

    .covema-brand-options {
        display: flex;
        margin-right: -16px;
        padding-right: 16px;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .covema-brand-options::-webkit-scrollbar {
        display: none;
    }

    .covema-brand-chip {
        min-width: 106px;
        min-height: 55px;
        flex: 0 0 auto;
    }

    .covema-filter-secondary {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .covema-catalog-grid.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .covema-vehicle-card {
        min-height: 320px;
        border-radius: 12px;
    }

    .covema-vehicle-card__image-link,
    .covema-vehicle-card__figure {
        min-height: 170px;
        height: 170px;
    }

    .covema-vehicle-card__figure {
        padding: 42px 8px 8px;
    }

    .covema-vehicle-card__figure img,
    .covema-vehicle-card__image {
        height: 115px !important;
    }

    .covema-vehicle-card__brand {
        top: 12px;
        left: 12px;
    }

    .covema-vehicle-card__brand-logo {
        max-width: 68px;
        height: 21px;
    }

    .covema-vehicle-card__body {
        padding: 14px 13px 13px;
    }

    .covema-vehicle-card__title {
        font-size: .93rem;
    }

    .covema-vehicle-card__price strong {
        font-size: .9rem;
    }

    .covema-vehicle-card__cta {
        font-size: .75rem;
    }

    .covema-vehicle-card__arrow {
        width: 27px;
        height: 27px;
    }
}

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

    .covema-vehicle-card__image-link,
    .covema-vehicle-card__figure {
        min-height: 210px;
        height: 210px;
    }

    .covema-vehicle-card__figure img,
    .covema-vehicle-card__image {
        height: 145px !important;
    }
}
