/**
 * HUEGO Shop archive module.
 * Layout wrapper and product-list toolbar only; category tree lives in components/category-tree.css.
 */

.huego-shop-sidebar {
    /*
     * This class is applied to an Elementor Container on the catalogue layout.
     * Elementor can declare `position` on `.e-con` after theme styles are queued.
     * Keep the HUEGO sticky contract authoritative; otherwise `top: 110px`
     * remains active on a relatively positioned container and visually shifts
     * the entire sidebar downward while its flow box stays in the old position.
     */
    position: sticky !important;
    top: 110px !important;
    align-self: flex-start;

    /*
     * The outer Elementor container is a layout/sticky wrapper only.
     * Visual borders/backgrounds belong to the individual sidebar cards.
     * Keeping decoration here creates one long frame around category,
     * best-seller and CTA sections.
     */
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.huego-shop-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 20px;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin: 0 0 16px;
    padding: 6px 10px;
    border: 1px solid var(--huego-color-border);
    border-radius: 10px;
    background: var(--huego-color-surface);
}

.huego-shop-result-count {
    flex: 1 1 auto;
    margin: 0;
    color: var(--huego-color-text-muted);
    font-size: 13px;
    font-weight: var(--huego-font-weight-regular);
    line-height: 1.4;
    white-space: nowrap;
}

.huego-shop-result-count strong {
    color: var(--huego-color-primary);
    font-weight: var(--huego-font-weight-semibold);
}

.huego-shop-ordering {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 10px;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.huego-shop-ordering label {
    display: inline-block;
    width: auto;
    margin: 0;
    color: var(--huego-color-text-muted);
    font-size: 13px;
    font-weight: var(--huego-font-weight-regular);
    line-height: 1;
    white-space: nowrap;
}

.huego-shop-ordering select {
    display: block;
    box-sizing: border-box;
    width: 170px !important;
    min-width: 170px;
    max-width: 170px;
    height: 36px;
    margin: 0 !important;
    padding: 0 34px 0 12px;
    border: 1px solid var(--huego-color-border);
    border-radius: 8px;
    outline: none;
    background-color: var(--huego-color-surface);
    color: var(--huego-color-text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    appearance: auto;
}

.huego-shop-ordering select:hover {
    border-color: var(--huego-color-border-strong);
}

.huego-shop-ordering select:focus-visible {
    border-color: var(--huego-color-focus);
    box-shadow: 0 0 0 3px var(--huego-color-focus-ring);
}

@media (max-width: 1024px) {
    .huego-shop-sidebar {
        position: static !important;
        top: auto !important;
    }
}

@media (max-width: 767px) {
    .huego-shop-toolbar {
        display: grid !important;
        grid-template-columns: auto 1fr;
        align-items: center !important;
        gap: 10px !important;
        width: 100%;
        min-height: 46px;
        margin: 0 0 14px;
        padding: 6px 8px;
        border-radius: 9px;
    }

    .huego-shop-result-count {
        width: auto;
        margin: 0;
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .huego-shop-result-count strong {
        font-size: 12.5px;
    }

    .huego-shop-ordering {
        display: grid !important;
        grid-template-columns: auto 158px;
        align-items: center;
        justify-self: end;
        gap: 5px;
        width: auto !important;
        min-width: 0;
        margin: 0 !important;
    }

    .huego-shop-ordering label {
        margin: 0;
        font-size: 12px;
        font-weight: 500;
        line-height: 1;
        white-space: nowrap;
    }

    .huego-shop-ordering select {
        width: 158px !important;
        min-width: 158px !important;
        max-width: 158px !important;
        height: 32px;
        margin: 0 !important;
        padding: 0 24px 0 8px;
        border-radius: 7px;
        font-size: 12px;
        line-height: 1;
    }
}
