/* Storefront product gallery — clean catalog layout */

:root {
    --wc-gallery-accent: #b8860b;
    --wc-gallery-accent-light: #d4af37;
    --wc-gallery-ink: #111111;
    --wc-gallery-muted: #9a9a9a;
    --wc-gallery-border: #dddddd;
    --wc-gallery-gold: #b8860b;
}

.tab-slider-product.wc-product-gallery-section,
.wc-product-gallery-section {
    background: #ffffff;
    padding: 48px 0 64px;
}

.wc-category-nav {
    margin: 0 0 36px;
}

.wc-product-gallery-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(300px, 28%);
    gap: 24px;
    align-items: start;
}

.wc-product-gallery-layout__main {
    min-width: 0;
}

.wc-product-gallery-layout__sidebar {
    min-width: 0;
}

.wc-product-gallery-layout__sidebar .wc-gold-price-inline {
    width: 100%;
    max-width: 100%;
    position: sticky;
    top: 96px;
}

@media (min-width: 992px) {
    .wc-product-gallery-layout .wc-product-grid--gallery.row-cols-xl-4 > .col-item {
        flex: 0 0 auto;
        width: 33.333333%;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .wc-product-gallery-layout .wc-product-grid--gallery.row-cols-lg-3 > .col-item {
        flex: 0 0 auto;
        width: 50%;
    }
}

@media (max-width: 991px) {
    .wc-product-gallery-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wc-product-gallery-layout__sidebar {
        order: -1;
    }

    .wc-product-gallery-layout__sidebar .wc-gold-price-inline {
        position: static;
    }
}

@media (max-width: 767px) {

.wc-category-nav__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.wc-category-nav__title {
    margin: 0 0 6px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.02em;
    line-height: 1.7;
    text-transform: none;
}

.wc-category-nav__subtitle {
    margin: 0;
    font-size: 0.92rem;
    color: var(--wc-gallery-muted);
    line-height: 1.45;
}

.wc-category-nav__view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--wc-gallery-border);
    background: #fff;
    color: var(--wc-gallery-ink);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.wc-category-nav__view-all:hover {
    color: var(--wc-gallery-gold);
    border-color: var(--wc-gallery-gold);
    box-shadow: 0 6px 18px rgba(184, 134, 11, 0.12);
    transform: translateY(-1px);
    text-decoration: none;
}

.wc-category-tabs-shell {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.wc-category-tabs-track {
    position: relative;
    flex: 1;
    min-width: 0;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.wc-category-tabs-track::before,
.wc-category-tabs-track::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wc-category-tabs-track::before {
    left: 0;
    background: linear-gradient(90deg, rgba(250, 250, 250, 0.98), rgba(250, 250, 250, 0));
}

.wc-category-tabs-track::after {
    right: 0;
    background: linear-gradient(270deg, rgba(250, 250, 250, 0.98), rgba(250, 250, 250, 0));
}

.wc-category-tabs-track.is-scroll-left::before,
.wc-category-tabs-track.is-scroll-right::after {
    opacity: 1;
}

.wc-category-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    margin: 0;
    padding: 12px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.wc-category-tabs::-webkit-scrollbar {
    display: none;
}

.wc-category-tabs .wc-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    background: #ffffff;
    color: var(--wc-gallery-ink);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    text-decoration: none;
    white-space: nowrap;
    scroll-snap-align: start;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.wc-category-tabs .wc-tab:hover {
    border-color: #d4af37;
    color: var(--wc-gallery-gold);
    background: #fff;
    box-shadow: 0 4px 14px rgba(184, 134, 11, 0.1);
    transform: translateY(-1px);
    text-decoration: none;
}

.wc-category-tabs .wc-tab.active {
    border-color: var(--wc-gallery-gold);
    color: #ffffff;
    background: linear-gradient(135deg, var(--wc-gallery-accent-light) 0%, var(--wc-gallery-gold) 100%);
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.24);
}

.wc-category-tabs-arrow {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    background: #fff;
    color: var(--wc-gallery-ink);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.wc-category-tabs-arrow:hover {
    border-color: var(--wc-gallery-gold);
    color: var(--wc-gallery-gold);
    box-shadow: 0 6px 16px rgba(184, 134, 11, 0.12);
}

.wc-category-tabs-arrow:active {
    transform: scale(0.96);
}

.wc-category-tabs-arrow[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.wc-product-grid--gallery {
    --bs-gutter-x: 20px;
    --bs-gutter-y: 24px;
}

.wc-product-gallery-section .col-row .col-item {
    padding-top: 0;
    display: flex;
}

.wc-product-gallery-section .wc-gallery-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: none;
}

.wc-product-gallery-section .wc-gallery-card:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
    color: inherit;
}

.wc-product-gallery-section .wc-gallery-card__image {
    width: 100%;
    max-width: none;
    aspect-ratio: 1;
    margin: 0 0 18px;
    padding: 0;
    background: #fff;
    border: none;
}

.wc-product-gallery-section .wc-gallery-card__image img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wc-product-gallery-section .wc-gallery-card__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 auto;
    padding: 0 2px 8px;
    text-align: center;
}

.wc-product-gallery-section .wc-gallery-card__title {
    margin: 0 0 18px;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    color: #111827;
    display: block;
    width: 100%;
    text-align: center;
    overflow: visible;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}

.wc-product-gallery-section .wc-gallery-card__meta {
    width: 100%;
    margin: 0;
}

.wc-product-gallery-section .wc-gallery-card__meta-line {
    margin: 0 0 10px;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.3;
    color: #6b7280;
    text-align: center;
}

.wc-product-gallery-section .wc-gallery-card__meta-line--carat {
    margin-bottom: 12px;
}

.wc-product-gallery-section .wc-gallery-card__meta-line:last-child {
    margin-bottom: 0;
}

.wc-product-gallery-section .wc-gallery-card__price {
    margin: 22px 0 18px;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    line-height: 1.3;
    color: #6b7280;
    text-align: center;
}

.wc-product-gallery-section .wc-gallery-card__soldout {
    margin: 0 0 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #b91c1c;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
}

.wc-product-gallery-section .wc-gallery-card__actions {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    width: 100%;
    margin: 4px 0 0;
}

.wc-product-gallery-section .wc-gallery-card__actions--view-only {
    grid-template-columns: 1fr;
}

.wc-product-gallery-section .wc-gallery-card__btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0.01em;
    color: #111827 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease !important;
}

.wc-product-gallery-section .wc-gallery-card__btn i {
    font-size: 0.75rem;
    line-height: 1;
}

.wc-product-gallery-section .wc-gallery-card__btn--view {
    width: auto;
    min-width: 42px;
    padding: 10px !important;
}

.wc-product-gallery-section .wc-gallery-card__btn--view i {
    font-size: 0.85rem;
}

.wc-product-gallery-section .wc-gallery-card__actions--view-only .wc-gallery-card__btn--view {
    width: 100%;
}

.wc-product-gallery-section .wc-gallery-card__btn--cart:hover,
.wc-product-gallery-section .wc-gallery-card__btn--view:hover {
    background: #111827 !important;
    color: #fff !important;
    border-color: #111827 !important;
    transform: translateY(-1px);
    box-shadow: none !important;
}

.wc-product-gallery-section .wc-gallery-card__btn--cart.is-disabled,
.wc-product-gallery-section .wc-gallery-card__btn--cart.is-loading {
    background: #f9fafb !important;
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
    cursor: not-allowed;
    transform: none !important;
    opacity: 1;
}

.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: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    padding: 4px;
    text-decoration: none;
    color: inherit;
}

.wc-gallery-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wc-product-gallery-section .wc-gallery-card__body {
    flex: 1 1 auto;
    padding: 14px 16px 0;
}

.wc-gallery-card__body {
    width: 100%;
    padding: 0 6px 8px;
}

.wc-product-gallery-section .wc-gallery-card__title {
    margin: 0 0 10px;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}

.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__title a,
.wc-product-gallery-section .wc-gallery-card__title a {
    color: inherit;
    text-decoration: none;
}

.wc-gallery-card__title a:hover,
.wc-product-gallery-section .wc-gallery-card__title a:hover {
    color: var(--wc-gallery-gold, #b8860b);
}

.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-product-gallery-section .wc-gallery-card__specs {
    margin: 0;
    text-align: left;
    display: grid;
    gap: 6px;
}

.wc-gallery-card__specs {
    width: 100%;
    margin: 0 0 12px;
    text-align: center;
}

.wc-product-gallery-section .wc-gallery-card__spec {
    margin: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.78rem;
    line-height: 1.4;
    text-align: left;
}

.wc-gallery-card__spec {
    margin: 0 0 4px;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--wc-gallery-muted);
    text-align: center;
}

.wc-product-gallery-section .wc-gallery-card__spec-label {
    flex-shrink: 0;
    color: #9ca3af;
    font-weight: 500;
}

.wc-gallery-card__spec-label {
    color: #6b7280;
}

.wc-product-gallery-section .wc-gallery-card__spec-value {
    color: #374151;
    font-weight: 600;
    text-align: right;
}

.wc-gallery-card__spec-value {
    color: #4b5563;
}

/* 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: 100%;
    }

    .wc-category-nav__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wc-category-nav__view-all {
        align-self: flex-start;
    }
}

@media (max-width: 576px) {
    .wc-category-nav {
        margin-bottom: 28px;
    }

    .wc-category-nav__title {
        font-size: 12px;
        font-weight: 500;
    }

    .wc-category-nav__subtitle {
        font-size: 0.86rem;
    }

    .wc-category-tabs-shell {
        gap: 6px;
    }

    .wc-category-tabs {
        gap: 8px;
        padding: 10px 12px;
    }

    .wc-category-tabs .wc-tab {
        min-height: 38px;
        padding: 8px 14px;
        font-size: 0.76rem;
    }

    .wc-category-tabs-arrow {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        font-size: 0.75rem;
    }

    .wc-gallery-card__image {
        max-width: 100%;
        margin-bottom: 14px;
    }

    .wc-gallery-card__title {
        font-size: 0.92rem;
    }

    .wc-badge {
        top: 10px;
        left: 10px;
        padding: 5px 9px;
        font-size: 0.62rem;
    }
}

.wc-fly-to-cart {
    position: fixed;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    z-index: 10050;
    pointer-events: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
    transition: transform 0.72s cubic-bezier(0.22, 0.85, 0.28, 1), opacity 0.72s ease;
    will-change: transform, opacity;
}

.wc-fly-to-cart img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wc-gallery-cart-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 16px);
    z-index: 10060;
    max-width: min(92vw, 360px);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.wc-gallery-cart-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.wc-gallery-cart-toast--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.wc-gallery-cart-toast--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.wc-gallery-cart-toast--info {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.header-cart.wc-cart-pulse,
.menubar-cart.wc-cart-pulse {
    animation: wcCartPulse 0.65s ease;
}

@keyframes wcCartPulse {
    0% { transform: scale(1); }
    35% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* ========================================
   Gallery card theme reset (style.css button rules)
   ======================================== */
.wc-product-gallery-section .wc-gallery-card button.wc-gallery-card__btn,
.wc-product-gallery-section .wc-gallery-card a.wc-gallery-card__btn,
.wc-product-gallery-section .wc-gallery-card span.wc-gallery-card__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    width: 100% !important;
    min-height: 42px !important;
    padding: 10px 12px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    color: #111827 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    outline: none !important;
    cursor: pointer;
}

.wc-product-gallery-section .wc-gallery-card__btn--cart.is-disabled,
.wc-product-gallery-section .wc-gallery-card__btn--cart.is-loading {
    background: #f9fafb !important;
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
}

.wc-product-gallery-section h3.wc-gallery-card__title {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: 0 !important;
}

.wc-product-gallery-section .wc-gallery-card__content p {
    margin-bottom: 0;
}
