/* Shop archive: header, filters, product grid, quick view, pagination. */

.hb-shop-page {
    padding-top: 40px;
}

.hb-shop-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.hb-shop-header h1 {
    margin: 0;
    color: var(--hb-burgundy);
    font-size: clamp(34px, 5vw, 56px);
}

.hb-shop-header p:not(.hb-eyebrow) {
    margin-bottom: 0;
    color: var(--hb-muted);
}

.hb-results-count {
    color: var(--hb-rose-ink);
    font-weight: 800;
    white-space: nowrap;
}

/* Filters */
.hb-shop-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
    margin-bottom: 34px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--hb-line);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(64, 25, 15, .06);
}

.hb-shop-filters label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--hb-ink);
    font-size: 13px;
    font-weight: 800;
}

.hb-shop-filters input,
.hb-shop-filters select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    background: var(--hb-cream);
    border: 1px solid var(--hb-line);
    border-radius: 12px;
    color: var(--hb-ink);
    font: inherit;
}

.hb-shop-filters input:focus,
.hb-shop-filters select:focus {
    outline: 2px solid var(--hb-rose);
    outline-offset: 1px;
}

.hb-filter-submit {
    min-height: 46px;
    background: linear-gradient(115deg, var(--hb-gold-ink), var(--hb-rose));
    color: #fff !important;
    font-weight: 800;
}

.hb-reset-filter {
    align-self: center;
    color: var(--hb-rose-ink);
    font-weight: 800;
    text-align: center;
}

.hb-stock-filter {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 46px;
    padding: 0 8px;
    color: var(--hb-burgundy) !important;
}

.hb-stock-filter input {
    width: 18px !important;
    min-height: 18px !important;
    accent-color: var(--hb-rose);
}

.hb-shop-results {
    min-height: 240px;
}

.hb-empty-shop {
    padding: 70px 24px;
    background: #fff;
    border: 1px solid var(--hb-line);
    border-radius: 24px;
    text-align: center;
}

.hb-empty-shop h2 { color: var(--hb-burgundy); }
.hb-empty-shop p { color: var(--hb-muted); }

/* Product cards */
.hb-product-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hb-product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--hb-line);
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(64, 25, 15, .06);
    transition: transform .22s ease, box-shadow .22s ease;
}

.hb-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 40px rgba(var(--hb-rose-rgb, 201, 37, 106), .13);
}

.hb-product-image {
    display: block;
    aspect-ratio: 1/1.18;
    overflow: hidden;
    background: var(--hb-cream);
}

.hb-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.22, .78, .3, 1);
}

.hb-product-card:hover .hb-product-image img {
    transform: scale(1.05);
}

.hb-product-card-body {
    padding: 16px;
}

.hb-product-card .woocommerce-loop-product__title {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.45;
}

.hb-product-card .woocommerce-loop-product__title a {
    color: var(--hb-burgundy);
}

.hb-product-card .price {
    display: block;
    min-height: 28px;
    color: var(--hb-gold-ink);
    font-weight: 900;
}

.hb-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.hb-product-actions .button {
    flex: 1 1 110px;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 14px;
    text-align: center;
}

.hb-quick-view-trigger {
    background: linear-gradient(115deg, var(--hb-gold-ink), var(--hb-rose));
    color: #fff !important;
}

.hb-product-link {
    background: var(--hb-cream);
    border: 1px solid var(--hb-line);
    color: var(--hb-burgundy) !important;
}

/* Quick view */
.hb-quick-view[hidden] {
    display: none;
}

.hb-quick-view {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(32, 0, 0, .62);
}

.hb-quick-view-panel {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 26px;
    background: var(--hb-cream);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(32, 0, 0, .32);
}

.hb-quick-view-close {
    position: absolute;
    top: 12px;
    inset-inline-end: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--hb-burgundy);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.hb-quick-view-content {
    display: grid;
    grid-template-columns: minmax(220px, .9fr) 1.1fr;
    gap: 28px;
    align-items: center;
}

.hb-quick-view-media { background: #fff; }

.hb-quick-view-media img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.hb-quick-view-copy { padding: 10px 0; }

.hb-quick-view-copy h2 {
    margin: 0 0 12px;
    color: var(--hb-burgundy);
    font-size: 30px;
}

.hb-quick-view-copy .price {
    margin-bottom: 16px;
    color: var(--hb-gold-ink);
    font-size: 22px;
    font-weight: 900;
}

.hb-quick-view-copy p:not(.hb-eyebrow) {
    color: var(--hb-muted);
    line-height: 1.8;
}

.hb-quick-note {
    color: var(--hb-burgundy) !important;
    font-weight: 800;
}

/* Pagination */
.hb-pagination {
    display: flex;
    justify-content: center;
    margin: 42px 0 20px;
}

.hb-pagination ul {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hb-pagination a,
.hb-pagination span {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid var(--hb-line);
    border-radius: 12px;
    color: var(--hb-rose-ink);
    font-weight: 800;
}

.hb-pagination .current {
    background: linear-gradient(115deg, var(--hb-rose), var(--hb-lilac));
    border-color: transparent;
    color: #fff;
}

@media (max-width: 900px) {
    .hb-shop-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hb-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .hb-shop-header {
        align-items: start;
        flex-direction: column;
    }

    .hb-shop-filters {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .hb-shop-filters .hb-filter-submit { width: 100%; }

    .hb-product-grid { gap: 12px; }
    .hb-product-card-body { padding: 12px; }
    .hb-product-card .woocommerce-loop-product__title { font-size: 16px; }
    .hb-product-actions { flex-direction: column; }

    .hb-quick-view-panel { padding: 20px 16px; }
    .hb-quick-view-content { grid-template-columns: 1fr; gap: 16px; }
    .hb-quick-view-media img { max-height: 260px; object-fit: contain; }
}
