/*
 * PREVENTA PRODUCTS CATALOG
 * Stand-alone styles for the product section only.
 * Designed to match the supplied WooCommerce-style reference image.
 */

.preventa-products-section {
    --product-orange: #f56a19;
    --product-orange-dark: #ee5f0d;
    --product-text: #292929;
    --product-muted: #666666;
    --product-border: #dedede;
    --product-panel: #f7f7f7;
    --product-white: #ffffff;

    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    color: var(--product-text);
    font-family: "Segoe UI", Arial, sans-serif;
    position: relative;
    isolation: isolate;
}

.preventa-products-container {
    width: min(1140px, calc(100% - 30px));
    margin: 0 auto;
    padding: 0 0 76px;
}

/* Intro / title */
.preventa-products-intro {
    background: #f8f8f8;
    margin: 0 calc((100vw - min(1140px, calc(100vw - 30px))) / -2);
    padding: 52px max(30px, calc((100vw - 1140px) / 2)) 42px;
}

.preventa-products-eyebrow {
    display: block;
    margin: 0 0 10px;
    color: var(--product-orange);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .25px;
}

.preventa-products-intro h1 {
    margin: 0;
    padding: 0;
    color: #292929;
    font-size: 42px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.7px;
}

.preventa-products-intro p {
    max-width: 850px;
    margin: 8px 0 0;
    color: #686868;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
}

/* Filter bar */
.preventa-products-toolbar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 0 27px;
}

.preventa-products-count {
    flex: 0 0 auto;
    min-width: 150px;
    color: #686868;
    font-size: 14px;
    line-height: 1.3;
}

.preventa-products-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.preventa-filter {
    appearance: none;
    border: 1px solid #d9d9d9;
    background: #f7f7f7;
    color: #555;
    min-height: 40px;
    padding: 0 17px;
    border-radius: 22px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 40px;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.preventa-filter:hover {
    border-color: var(--product-orange);
    color: var(--product-orange);
}

.preventa-filter.is-active {
    background: var(--product-orange);
    border-color: var(--product-orange);
    color: #fff;
}

.preventa-filter:active {
    transform: translateY(1px);
}

/* Grid */
.preventa-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 26px;
}

.preventa-product-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--product-border);
    border-radius: 0 0 7px 7px;
    box-shadow: none;
    transition: transform .25s ease, box-shadow .25s ease;
}

.preventa-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.preventa-product-image {
    height: 282px;
    padding: 16px 16px 10px;
    position: relative;
    overflow: hidden;
    background: var(--product-panel);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preventa-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform .35s ease;
}

.preventa-product-card:hover .preventa-product-image img {
    transform: scale(1.025);
}

.preventa-product-badge {
    position: absolute;
    z-index: 3;
    top: 14px;
    left: 13px;
    min-width: 77px;
    padding: 8px 11px;
    border-radius: 18px;
    background: var(--product-orange);
    color: #fff;
    text-align: center;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .2px;
}

.preventa-product-view {
    position: absolute;
    z-index: 4;
    left: 16px;
    right: 16px;
    bottom: 10px;
    height: 38px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--product-orange);
    color: #fff !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15px;
    line-height: 1;
    text-decoration: none !important;
    opacity: 1;
    transform: none;
    transition: background .2s ease, transform .2s ease;
}

.preventa-product-view:hover,
.preventa-product-view:focus {
    background: var(--product-orange-dark);
    color: #fff !important;
    transform: translateY(-1px);
}

.preventa-product-info {
    min-height: 123px;
    padding: 16px 16px 18px;
    background: #fff;
}

.preventa-product-info > span {
    display: block;
    margin: 0 0 9px;
    color: var(--product-orange);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .2px;
}

.preventa-product-info h2 {
    margin: 0;
    padding: 0;
    color: #2d2d2d;
    font-size: 19px;
    font-weight: 750;
    line-height: 1.25;
}

.preventa-products-empty {
    padding: 50px 20px;
    text-align: center;
    color: #666;
    font-size: 15px;
    background: #f8f8f8;
}

.preventa-product-card.is-hidden {
    display: none;
}

.preventa-product-anchor {
    display: block;
    position: relative;
    top: -90px;
    visibility: hidden;
    height: 0;
}

/* Responsive */
@media (max-width: 1199px) {
    .preventa-products-container {
        width: min(960px, calc(100% - 30px));
    }

    .preventa-products-intro {
        margin-left: calc((960px - min(960px, calc(100vw - 30px))) / -2);
        margin-right: calc((960px - min(960px, calc(100vw - 30px))) / -2);
        padding-left: 30px;
        padding-right: 30px;
    }

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

    .preventa-products-toolbar {
        align-items: flex-start;
    }
}

@media (max-width: 991px) {
    .preventa-products-container {
        width: min(720px, calc(100% - 30px));
    }

    .preventa-products-intro {
        margin-left: calc((720px - min(720px, calc(100vw - 30px))) / -2);
        margin-right: calc((720px - min(720px, calc(100vw - 30px))) / -2);
    }

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

    .preventa-products-toolbar {
        display: block;
    }

    .preventa-products-count {
        margin-bottom: 14px;
    }

    .preventa-products-image {
        height: 300px;
    }
}

@media (max-width: 575px) {
    .preventa-products-container {
        width: calc(100% - 24px);
        padding-bottom: 50px;
    }

    .preventa-products-intro {
        margin-left: -12px;
        margin-right: -12px;
        padding: 38px 22px 32px;
    }

    .preventa-products-eyebrow {
        font-size: 12px;
    }

    .preventa-products-intro h1 {
        font-size: 34px;
    }

    .preventa-products-intro p {
        font-size: 14px;
        line-height: 1.45;
    }

    .preventa-products-toolbar {
        padding-top: 20px;
        padding-bottom: 22px;
    }

    .preventa-products-filters {
        gap: 7px;
    }

    .preventa-filter {
        min-height: 36px;
        padding: 0 13px;
        font-size: 10px;
        line-height: 36px;
    }

    .preventa-products-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .preventa-product-image {
        height: 310px;
    }

    .preventa-product-info {
        min-height: 105px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .preventa-product-card,
    .preventa-product-image img,
    .preventa-filter,
    .preventa-product-view {
        transition: none;
    }
}
