/* ================================================
   FERIAS — Vendor booth cards (shared: home + ferias page)
   ================================================ */

.feria-section {
    margin-bottom: 8px;
}

.feria-sellers {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.feria-seller-card {
    display: flex;
    align-items: stretch;
    border: 1px solid #ececec;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.feria-seller-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.feria-seller-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 20px 18px;
    min-width: 160px;
    max-width: 180px;
    border-right: 1px solid #ececec;
    background: #e4f2ee;
    flex-shrink: 0;
}

.feria-seller-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ededed;
    color: #a9a9a9;
    font-size: 24px;
    flex-shrink: 0;
}

.feria-seller-name {
    font-size: 14px;
    font-weight: 400;
    color: var(--ho-ho_darkgrey);
    line-height: 1.3;
    word-break: break-word;
}

.feria-seller-id {
    display: block;
    font-weight: 700;
    color: var(--ho-ho_black);
}

.feria-seller-name:hover,
.feria-seller-name:hover .feria-seller-id {
    color: var(--ho-ho_darkgreen);
}

.feria-seller-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ho-ho_lightgreen);
    white-space: nowrap;
}

.feria-seller-cta:hover {
    color: var(--ho-ho_darkgreen);
}

.feria-seller-products {
    display: flex;
    flex: 1;
    gap: 0;
    overflow: hidden;
}

.feria-product-thumb {
    flex: 0 0 25%;
    max-width: 25%;
    min-width: 0;
    padding: 10px;
}

/* Ensure the inner home-product-card fills the thumb wrapper */
.feria-product-thumb .home-product-card {
    height: 100%;
    margin: 0;
}

/* Mobile & small tablets: stack seller info on top, products in a grid */
@media (max-width: 767.98px) {
    .feria-seller-card {
        flex-direction: column;
    }

    .feria-seller-info {
        max-width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid #ececec;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        padding: 12px 14px;
    }

    .feria-seller-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .feria-seller-name {
        flex: 1;
    }

    .feria-seller-products {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .feria-product-thumb {
        flex: unset;
        max-width: unset;
    }
}

/* Small tablets: 3 per row keeps the cards from getting too narrow */
@media (min-width: 576px) and (max-width: 767.98px) {
    .feria-seller-products {
        grid-template-columns: repeat(3, 1fr);
    }

    .feria-product-thumb:nth-child(n + 4) {
        display: none;
    }
}

/* Tablet: keep the horizontal booth, but only 3 thumbs next to the info panel */
@media (min-width: 768px) and (max-width: 991.98px) {
    .feria-seller-info {
        min-width: 140px;
        max-width: 160px;
    }

    .feria-product-thumb {
        flex-basis: 33.333%;
        max-width: 33.333%;
    }

    .feria-product-thumb:nth-child(n + 4) {
        display: none;
    }
}

/* ================================================
   FERIAS — Listing page
   ================================================ */

.ferias-page__title .heading-emoji {
    margin-right: 8px;
    font-style: normal;
}

.ferias-page__description {
    margin: 0 0 0.5rem;
    max-width: 40rem;
    color: var(--ho-ho_darkgrey);
    font-size: 0.95rem;
    line-height: 1.45;
}

.ferias-page__seller {
    margin: 0 0 0.35rem;
    color: var(--ho-ho_darkgrey);
    font-size: 0.95rem;
}

.ferias-page__seller strong {
    color: var(--ho-ho_black);
    font-weight: 700;
}

.ferias-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ferias-sort__label {
    margin: 0;
    color: var(--ho-ho_darkgrey);
    font-size: 0.875rem;
    white-space: nowrap;
}

.ferias-sort .custom_select select,
.ferias-sort .custom_select select.form-control-sm {
    height: 42px;
    border-radius: 8px;
    font-size: 0.875rem;
}

/* Single seller booth: product grid */
.ferias-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 576px) {
    .ferias-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .ferias-products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1200px) {
    .ferias-products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.ferias-empty {
    margin-top: 24px;
}

.ferias-load-more {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.ferias-load-more__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: min(360px, 100%);
    padding: 12px 32px;
    border: 1px solid var(--ho-ho_lightgreen);
    border-radius: 999px;
    background-color: var(--ho-ho_white);
    color: var(--ho-ho_lightgreen);
    font-size: 15px;
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ferias-load-more__btn:hover,
.ferias-load-more__btn:focus {
    background-color: var(--ho-ho_lightgreen);
    color: var(--ho-ho_white);
    box-shadow: 0 6px 18px rgba(73, 193, 186, 0.28);
}

.ferias-load-more__btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 575.98px) {
    .ferias-sort {
        width: 100%;
        margin-top: 12px;
    }

    .ferias-sort .custom_select {
        flex: 1;
    }

    .ferias-load-more__btn {
        width: 100%;
        padding: 11px 24px;
        font-size: 14px;
    }
}
