/* Product detail — Wes mockup */

.page-shop-detail {
    background: #fff;
}

.page-shop-detail #main {
    padding-top: 0;
}

.page-shop-detail .site-header.site-header--mockup {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid #ece7df;
}

.product-detail-shell {
    width: var(--home-shell);
    margin-inline: auto;
}

.product-breadcrumb {
    margin: 20px 0 28px;
    font-size: 0.8125rem;
    color: #8a8a8a;
}

.product-breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0;
    padding: 0;
}

.product-breadcrumb a {
    color: #8a8a8a;
    text-decoration: none;
}

.product-breadcrumb a:hover {
    color: var(--home-ink, #1a1a1a);
}

.product-breadcrumb [aria-current="page"] {
    color: var(--home-ink, #1a1a1a);
}

.product-breadcrumb li[aria-hidden="true"] {
    color: #c4c4c4;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(28px, 4vw, 48px);
    align-items: start;
    padding-bottom: clamp(40px, 5vw, 56px);
}

/* Gallery */
.product-gallery__layout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.product-gallery__thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-gallery__thumb {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
}

.product-gallery__thumb.is-active {
    border-color: var(--home-ink, #1a1a1a);
}

.product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-gallery__stage {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f3f3;
    aspect-ratio: 1;
}

.product-gallery__slide {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery__slide.is-active {
    display: block;
}

.product-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--home-ink, #1a1a1a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.product-gallery__nav--prev {
    left: 12px;
}

.product-gallery__nav--next {
    right: 12px;
}

.product-gallery__expand {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--home-ink, #1a1a1a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-gallery:not([data-count="1"]) .product-gallery__stage .product-gallery__expand {
    bottom: 12px;
}

.product-gallery-lightbox-open {
    overflow: hidden;
}

.product-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 40px);
}

.product-gallery-lightbox[hidden] {
    display: none;
}

.product-gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.82);
    cursor: pointer;
}

.product-gallery-lightbox__dialog {
    position: relative;
    z-index: 1;
    max-width: min(1100px, 100%);
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: min(85vh, 900px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.product-gallery-lightbox__close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: #1a1a1a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.product-gallery-lightbox__close:hover {
    background: #f4f4f5;
}

@media (max-width: 640px) {
    .product-gallery-lightbox__close {
        top: 8px;
        right: 8px;
    }
}

/* Buy box */
.product-buy {
    padding-top: 4px;
}

.product-buy__badge {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.product-buy__badge--available {
    background: #e8f7ec;
    color: #1f7a3f;
}

.product-buy__badge--sold {
    background: #f3f4f6;
    color: #4b5563;
}

.product-buy__badge--made_to_order {
    background: #f5f0ff;
    color: #5b21b6;
}

.product-buy__badge--showcase {
    background: #f5f5f5;
    color: #666;
}

.product-buy__title {
    margin: 0 0 8px;
    font-size: clamp(2rem, 3.2vw, 2.65rem);
    line-height: 1.08;
    color: var(--home-ink, #1a1a1a);
}

.product-buy__price {
    margin: 0 0 16px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--home-ink, #1a1a1a);
}

.product-buy__lead {
    margin: 0 0 22px;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #5c5c5c;
}

.product-specs {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: grid;
    gap: 0;
}

.product-specs li {
    display: grid;
    grid-template-columns: 22px minmax(4.75rem, 6rem) minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #ebebeb;
    font-size: 0.875rem;
    line-height: 1.4;
}

.product-specs li:first-child {
    border-top: 1px solid #ebebeb;
}

.product-specs__icon {
    width: 20px;
    height: 20px;
    color: #1a1a1a;
}

.product-specs__label {
    font-weight: 500;
    color: #6f6f6f;
}

.product-specs__value {
    font-weight: 400;
    color: #6f6f6f;
}

.product-checkout {
    display: grid;
    gap: 12px;
}

.product-actions {
    display: grid;
    gap: 12px;
    margin: 0;
}

.product-actions__form {
    margin: 0;
    width: 100%;
}

.product-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    box-sizing: border-box;
}

.product-btn--cart {
    background: #8f6bd9;
    color: #fff;
}

.product-btn--cart:hover {
    background: #7d59c9;
    color: #fff;
}

.product-btn__cart-left,
.product-btn__mercari-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.product-btn__cart-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-weight: 600;
}

.product-btn__price {
    letter-spacing: 0.01em;
}

.product-btn__icon {
    flex-shrink: 0;
}

.product-btn--mercari {
    background: #fff;
    color: var(--home-ink, #1a1a1a);
    border: 1px solid #e3e3e3;
    font-weight: 700;
}

.product-btn--mercari:hover {
    background: #fcfcfc;
}

.product-btn__mercari-logo {
    flex-shrink: 0;
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.product-btn__external {
    flex-shrink: 0;
    color: var(--home-ink, #1a1a1a);
}

.product-shipping-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 16px 18px;
    border-radius: 14px;
    background: #f5f0fc;
}

.product-shipping-note > svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #8f6bd9;
}

.product-shipping-note__copy {
    min-width: 0;
}

.product-shipping-note__title {
    display: block;
    margin: 0 0 4px;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    color: #8f6bd9;
}

.product-shipping-note__body {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.45;
    color: #5c5c5c;
}

.product-status-message {
    margin: 0 0 16px;
    font-size: 0.9375rem;
    color: #5c5c5c;
}

/* Trust banner */
.product-trust {
    padding: clamp(28px, 4vw, 40px) 0 clamp(32px, 4vw, 44px);
    background: #fff;
}

.product-trust__shell {
    width: var(--home-shell);
    margin-inline: auto;
}

.product-trust__card {
    padding: clamp(22px, 3vw, 28px) clamp(22px, 3vw, 32px);
    border: 1px solid #eceae6;
    border-radius: 12px;
    background: #faf9f7;
    box-shadow: 0 1px 2px rgba(26, 26, 26, 0.04);
}

.product-trust__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(18px, 2.5vw, 28px);
    align-items: center;
}

.product-trust__item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.product-trust__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #1a1a1a;
}

.product-trust__copy {
    min-width: 0;
}

.product-trust__title {
    margin: 0 0 4px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
}

.product-trust__body {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.45;
    color: #6f6f6f;
}

/* Tabs */
.product-tabs-section {
    padding: clamp(36px, 4vw, 48px) 0 clamp(48px, 5vw, 64px);
    background: #fff;
}

.product-tabs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin: 0 0 28px;
    padding: 0 0 12px;
    list-style: none;
    border-bottom: 1px solid #e8e4dc;
}

.product-tabs__tab {
    padding: 0 0 12px;
    margin-bottom: -13px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #888;
    cursor: pointer;
}

.product-tabs__tab.is-active {
    color: var(--home-ink, #1a1a1a);
    border-bottom-color: var(--home-accent, #8b6fd7);
}

.product-tabs__panels {
    display: none;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #5c5c5c;
}

.product-tabs__panels.is-active {
    display: block;
}

.product-tabs__panels--split.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 40px);
    align-items: start;
}

.product-tabs__panels p + p {
    margin-top: 1em;
}

.product-tabs__media {
    border-radius: 14px;
    overflow: hidden;
    background: #f0f0f0;
    aspect-ratio: 4 / 3;
}

.product-tabs__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Related */
.product-related {
    padding: 0 0 clamp(56px, 6vw, 72px);
    background: #fff;
}

.product-related__title {
    margin: 0 0 clamp(22px, 3vw, 28px);
    font-size: clamp(1.85rem, 3vw, 2.5rem);
    line-height: 1.1;
    color: var(--home-ink, #1a1a1a);
    text-align: left;
}

.product-related__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

@media (max-width: 1100px) {
    .product-trust__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 24px;
    }

    .product-related__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-tabs__panels--split.is-active {
        grid-template-columns: 1fr;
    }

    .product-tabs__media {
        order: -1;
    }
}

@media (max-width: 820px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-gallery__layout {
        grid-template-columns: 1fr;
    }

    .product-gallery__thumbs {
        flex-direction: row;
        order: 2;
        overflow-x: auto;
    }

    .product-gallery__stage {
        order: 1;
    }

    .product-trust__card {
        padding: 20px 18px;
    }

    .product-trust__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .product-related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}
