/* Progressive catalogue controls for the existing light HK storefront design. */
.hk-catalogue-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(135px, .7fr)) auto auto;
    align-items: end;
    gap: 14px;
}

.hk-catalogue-controls > div {
    min-width: 0;
}

.hk-catalogue-controls__search {
    min-width: 0;
}

.hk-catalogue-controls__field label,
.hk-catalogue-controls__search label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 7px;
    line-height: 1.5;
}

.hk-catalogue-controls select {
    width: 100%;
    height: 44px;
    border: 1px solid #dce1ea;
    border-radius: 9px;
    padding: 8px 34px 8px 11px;
    background: #fff;
    color: var(--hk-navy);
    font-size: 13px;
}

.hk-stock-toggle {
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 0 2px;
    color: var(--hk-navy);
    font-size: 12px !important;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.hk-stock-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--hk-red);
}

.hk-catalogue-controls__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    white-space: nowrap;
}

.hk-catalogue-controls__actions .hk-button {
    min-height: 44px;
}

.hk-catalogue-controls.is-loading {
    opacity: .72;
}

.hk-catalogue-feedback {
    margin: -10px 0 20px;
    padding: 10px 13px;
    border: 1px solid #f0d6d0;
    border-radius: 10px;
    background: #fff6f2;
    color: #8e3c3c;
    font-size: 12px;
    line-height: 1.6;
}

#hkCatalogueResults[aria-busy="true"] .hk-product-grid {
    opacity: .58;
    pointer-events: none;
}

.hk-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.hk-load-more {
    min-width: 190px;
    background: #fff;
}

.hk-load-more:hover {
    border-color: #d7b4ae;
    color: var(--hk-red);
}

.hk-load-more.is-loading {
    pointer-events: none;
    opacity: .62;
}

.hk-load-more.is-loading i {
    animation: hk-load-spin .8s linear infinite;
}

@keyframes hk-load-spin {
    to { transform: rotate(360deg); }
}

.hk-hot-items-page main select:focus-visible,
.hk-hot-items-page main input[type="checkbox"]:focus-visible {
    outline: 3px solid #bc253866;
    outline-offset: 3px;
}

@media (max-width: 1199px) {
    .hk-catalogue-controls {
        grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(150px, .8fr));
    }

    .hk-catalogue-controls__field:nth-of-type(4),
    .hk-stock-toggle,
    .hk-catalogue-controls__actions {
        grid-row: 2;
    }
}

@media (max-width: 991px) {
    .hk-catalogue-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hk-catalogue-controls__search {
        grid-column: 1 / -1;
    }

    .hk-catalogue-controls__field:nth-of-type(4),
    .hk-stock-toggle,
    .hk-catalogue-controls__actions {
        grid-row: auto;
    }

    .hk-catalogue-controls__actions {
        justify-content: flex-end;
    }
}

@media (max-width: 575px) {
    .hk-catalogue-controls {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hk-catalogue-controls > div,
    .hk-catalogue-controls__field,
    .hk-catalogue-controls__search,
    .hk-stock-toggle,
    .hk-catalogue-controls__actions {
        width: 100%;
    }

    .hk-catalogue-controls__actions {
        justify-content: space-between;
    }

    .hk-stock-toggle {
        min-height: 34px;
    }
}


/* Local Store cart actions: shared by public and Client Portal catalogues. */
.hk-product-card__actions--commerce {
    gap: 10px;
}

.hk-product-card__commerce-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.hk-product-card__commerce-actions .hk-button {
    min-height: 38px;
    padding: 9px 11px;
    white-space: nowrap;
}

.hk-button--cart {
    border: 1px solid #dccac6;
    background: #fff7f4;
    color: var(--hk-red);
}

.hk-button--cart:hover,
.hk-button--cart:focus-visible {
    border-color: var(--hk-red);
    background: #fff0ec;
    color: var(--hk-red);
    text-decoration: none;
}

.hk-product-card__sold-out {
    margin-left: auto;
}

@media (max-width: 1199px) {
    .hk-product-card__actions--commerce {
        align-items: stretch;
        flex-direction: column;
    }

    .hk-product-card__actions--commerce .hk-text-link {
        align-self: flex-start;
    }

    .hk-product-card__commerce-actions {
        width: 100%;
    }

    .hk-product-card__commerce-actions .hk-button {
        flex: 1 1 0;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .hk-product-card__commerce-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .hk-product-card__commerce-actions .hk-button {
        width: 100%;
    }
}
