/* ─── Shop Page Styles ────────────────────────────────────── */

/* Shop Header */
.jj-shop__header {
    padding: var(--space-3xl) 0 var(--space-xl);
    text-align: center;
    background: linear-gradient(180deg, var(--jj-rose-lighter) 0%, var(--jj-ivory) 100%);
}

.jj-shop__title {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 500;
    color: var(--jj-charcoal);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.jj-shop__description {
    max-width: 560px;
    margin: 0 auto var(--space-md);
    color: var(--jj-charcoal-light);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
}

.jj-shop__count {
    font-size: var(--text-sm);
    color: var(--jj-charcoal-lighter);
}

/* Override WooCommerce default result count styles */
.jj-shop__count .woocommerce-result-count {
    margin: 0;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

/* ─── Filter Bar ─────────────────────────────────────────── */
.jj-filter-bar {
    position: sticky;
    top: var(--header-height);
    z-index: var(--z-sticky);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(232, 196, 200, 0.2);
    padding: var(--space-md) 0;
}

.jj-filter-bar__scroll {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: var(--space-xs) 0;
}

.jj-filter-bar__scroll::-webkit-scrollbar {
    display: none;
}

.jj-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    min-height: 44px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--jj-charcoal);
    background: var(--jj-white);
    border: 1.5px solid var(--jj-rose-light);
    border-radius: var(--radius-pill);
    white-space: nowrap;
    cursor: pointer;
    scroll-snap-align: start;
    flex-shrink: 0;
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-out);
}

.jj-filter-btn:hover {
    border-color: var(--jj-mauve);
    color: var(--jj-mauve-dark);
    background: var(--jj-rose-lighter);
}

.jj-filter-btn.is-active {
    background: var(--jj-mauve);
    border-color: var(--jj-mauve);
    color: var(--jj-white);
}

/* ─── Product Grid ───────────────────────────────────────── */
.jj-shop__products {
    padding: var(--space-xl) 0 var(--space-section);
}

.jj-shop__grid {
    gap: var(--gutter);
}

/* ─── Product Card ───────────────────────────────────────── */
.jj-product-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--jj-white);
}

.jj-product-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.jj-product-card__link:hover {
    color: inherit;
}

.jj-product-card__image {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--jj-ivory-dark);
}

.jj-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity var(--duration-base) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

.jj-product-card__img--primary {
    position: relative;
    z-index: 1;
}

.jj-product-card__img--hover {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
}

.jj-product-card:hover .jj-product-card__img--primary {
    opacity: 0;
}

.jj-product-card:hover .jj-product-card__img--hover {
    opacity: 1;
    z-index: 2;
}

/* Badges */
.jj-product-card__badges {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    z-index: 3;
}

/* Card Body */
.jj-product-card__body {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.jj-label {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--jj-charcoal-lighter);
    margin-bottom: var(--space-xs);
}

.jj-product-card__title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--jj-charcoal);
    line-height: var(--leading-snug);
    margin-bottom: var(--space-sm);
}

.jj-product-card__price {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--jj-charcoal);
    margin-bottom: var(--space-sm);
}

.jj-product-card__price del {
    color: var(--jj-charcoal-lighter);
    font-weight: 400;
    margin-right: var(--space-xs);
}

.jj-product-card__price ins {
    text-decoration: none;
    color: var(--jj-error);
}

.jj-product-card__rating {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.jj-product-card__review-count {
    font-size: var(--text-xs);
    color: var(--jj-charcoal-lighter);
}

/* ─── Empty State ────────────────────────────────────────── */
.jj-shop__empty {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.jj-shop__empty svg {
    margin: 0 auto var(--space-lg);
    opacity: 0.6;
}

.jj-shop__empty h2 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

.jj-shop__empty p {
    color: var(--jj-charcoal-light);
    margin-bottom: var(--space-xl);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Pagination ─────────────────────────────────────────── */
.jj-pagination {
    margin-top: var(--space-2xl);
    display: flex;
    justify-content: center;
}

.jj-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    list-style: none;
    margin: 0;
    padding: 0;
}

.jj-pagination .page-numbers li {
    display: flex;
}

.jj-pagination .page-numbers a,
.jj-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--space-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--jj-charcoal);
    text-decoration: none;
    border-radius: var(--radius-pill);
    transition: all var(--duration-fast) var(--ease-out);
    gap: var(--space-xs);
}

.jj-pagination .page-numbers a:hover {
    background: var(--jj-rose-lighter);
    color: var(--jj-mauve-dark);
}

.jj-pagination .page-numbers .current {
    background: var(--jj-mauve);
    color: var(--jj-white);
}

.jj-pagination .page-numbers .prev,
.jj-pagination .page-numbers .next {
    gap: var(--space-xs);
}

.jj-pagination .page-numbers .prev svg,
.jj-pagination .page-numbers .next svg {
    flex-shrink: 0;
}

.jj-pagination .page-numbers .dots {
    color: var(--jj-charcoal-lighter);
    cursor: default;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .jj-shop__header {
        padding: var(--space-xl) 0 var(--space-lg);
    }

    .jj-shop__title {
        font-size: var(--text-2xl);
    }

    .jj-filter-bar {
        padding: var(--space-sm) 0;
    }

    .jj-filter-btn {
        padding: 8px 16px;
        min-height: 44px;
        font-size: var(--text-xs);
    }

    .jj-product-card__body {
        padding: var(--space-sm) var(--space-md) var(--space-md);
    }

    .jj-product-card__title {
        font-size: var(--text-base);
    }

    .jj-product-card__price {
        font-size: var(--text-sm);
    }
}

@media (max-width: 480px) {
    .jj-shop__grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-sm);
    }

    .jj-product-card__body {
        padding: var(--space-sm);
    }

    .jj-product-card__title {
        font-size: var(--text-sm);
    }

    .jj-pagination .page-numbers a,
    .jj-pagination .page-numbers span {
        min-width: 44px;
        height: 44px;
        font-size: var(--text-xs);
    }
}
