/* Storefront product gallery — clean catalog layout */

:root {
    --wc-gallery-accent: #e86b14;
    --wc-gallery-ink: #111111;
    --wc-gallery-muted: #9a9a9a;
    --wc-gallery-border: #dddddd;
}

.tab-slider-product.wc-product-gallery-section,
.wc-product-gallery-section {
    background: #ffffff;
    padding: 48px 0 64px;
}

.wc-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 0 0 40px;
}

.wc-category-tabs .wc-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 22px;
    border: 1px solid var(--wc-gallery-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--wc-gallery-ink);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.wc-category-tabs .wc-tab:hover,
.wc-category-tabs .wc-tab.active {
    border-color: var(--wc-gallery-accent);
    color: var(--wc-gallery-accent);
    background: #ffffff;
}

.wc-product-grid--gallery {
    --bs-gutter-x: 28px;
    --bs-gutter-y: 36px;
}

.wc-gallery-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: transform 0.25s ease;
}

.wc-gallery-card:hover {
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}

.wc-gallery-card__image {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    padding: 8px;
}

.wc-gallery-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wc-gallery-card__body {
    width: 100%;
    padding: 0 6px 8px;
}

.wc-gallery-card__title {
    margin: 0 0 6px;
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--wc-gallery-ink);
}

.wc-gallery-card__category {
    margin: 0 0 10px;
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--wc-gallery-muted);
}

.wc-gallery-card__price {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--wc-gallery-ink);
}

/* Legacy badge support (hidden in gallery cards) */
.wc-product-card .product-image {
    position: relative;
}

.wc-gallery-card .wc-badge,
.wc-gallery-card .product-labels {
    display: none !important;
}

.wc-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 28px);
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
    border: 1px solid transparent;
    pointer-events: none;
}

.wc-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wc-badge-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-badge--new {
    background: rgba(255, 255, 255, 0.96);
    color: #1f1b16;
    border-color: rgba(212, 175, 55, 0.35);
}

.wc-badge--new .wc-badge-dot {
    background: linear-gradient(135deg, #e8c872 0%, #b8860b 100%);
}

.wc-badge--preloved {
    background: rgba(255, 251, 245, 0.96);
    color: #7c2d12;
    border-color: rgba(234, 88, 12, 0.22);
}

.wc-badge--preloved .wc-badge-dot {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
}

.wc-badge--wafer {
    background: rgba(248, 250, 252, 0.96);
    color: #0f172a;
    border-color: rgba(100, 116, 139, 0.22);
}

.wc-badge--wafer .wc-badge-dot {
    background: linear-gradient(135deg, #94a3b8 0%, #475569 100%);
}

.wc-badge--produk {
    background: rgba(239, 246, 255, 0.96);
    color: #1e3a8a;
    border-color: rgba(59, 130, 246, 0.22);
}

.wc-badge--produk .wc-badge-dot {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
}

.wc-badge--default {
    background: rgba(255, 255, 255, 0.96);
    color: #374151;
    border-color: rgba(209, 213, 219, 0.8);
}

.wc-badge--default .wc-badge-dot {
    background: #9ca3af;
}

@media (max-width: 991px) {
    .wc-gallery-card__image {
        max-width: 190px;
    }
}

@media (max-width: 576px) {
    .wc-category-tabs .wc-tab {
        font-size: 0.72rem;
        padding: 7px 14px;
    }

    .wc-gallery-card__image {
        max-width: 160px;
        margin-bottom: 14px;
    }

    .wc-gallery-card__title {
        font-size: 0.92rem;
    }

    .wc-badge {
        top: 10px;
        left: 10px;
        padding: 5px 9px;
        font-size: 0.62rem;
    }
}
