/* Page-scoped styles keep shared storefront components unchanged. */
.product-detail {
    color: #333;
}
.product-detail *, .lightbox * {
    box-sizing: border-box;
}
.product-detail button, .product-detail input, .product-detail textarea {
    font: inherit;
}
.product-detail button {
    cursor: pointer;
}
.product-detail :focus-visible, .lightbox :focus-visible {
    outline: 3px solid #994099;
    outline-offset: 3px;
}
.product-detail .gallery {
    display: flex;
}
.product-detail .thumbs {
    display: flex;
    flex-direction: column;
}
.product-detail .thumbs img {
    cursor: pointer;
    border: 2px solid transparent;
}
.product-detail .thumbs img.active {
    border-color: #7f2a7d;
}
.product-detail .desktop-main img {
    cursor: zoom-in;
}
.product-detail .mobile-dots {
    display: none;
}
.product-detail .mobile-slider {
    flex: 1;
}
@media (min-width: 769px) {
    .product-detail .m-slide:not(:first-child) {
        display: none;
    }
    .product-detail .m-slide img {
        cursor: zoom-in;
    }
}
.product-detail .price-new, .product-detail .price {
    color: #7f2a7d;
    font-weight: 700;
}
.product-detail .price-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.product-detail .price-old {
    color: #777;
    text-decoration: line-through;
}
.product-detail .price-badge {
    color: #7f2a7d;
    background: #faf5ff;
}
.product-detail .features-box {
    background: #faf5ff;
}
.product-detail .features-box h3 {
    color: #7f2a7d;
}
.product-detail .features-box ul {
    padding-inline-start: 20px;
}
.product-detail .quantity-box {
    align-items: center;
    background: #f7f7fa;
}
.product-detail .quantity-box input {
    border: 0;
    background: transparent;
    text-align: center;
    appearance: textfield;
}
.product-detail .quantity-box input::-webkit-inner-spin-button {
    appearance: none;
}
.product-detail .qty-btn {
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: #7f2a7d;
}
.product-detail .add-btn, .product-detail .review-btn, .product-detail .review-open {
    background: #7f2a7d;
    color: #fff;
    border: 0;
}
.product-detail .product-size-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.product-detail .product-size-select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #ded4e0;
    background: #fff;
    font: inherit;
}
.product-detail .required-star {
    color: #b42333;
}
.product-detail .product-wishlist-btn {
    border: 1px solid #ded4e0;
    color: #7f2a7d;
    font-size: 27px;
}
.wishlist-toast {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    max-width: calc(100% - 32px);
    padding: 12px 16px;
    border: 1px solid #ded4e0;
    border-radius: 12px;
    background: #fff;
    color: #7f2a7d;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}
.wishlist-toast.show {
    visibility: visible;
    opacity: 1;
}
.wishlist-toast.error {
    color: #b42333;
}
.wishlist-toast-icon {
    margin-inline-end: 8px;
}
.product-detail > .container {
    width: calc(100% - 32px);
    max-width: 1200px;
    margin-inline: auto;
}

.product-detail .product-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
    gap: 32px;
    margin: 32px 0;
}

.product-detail .product-info,
.product-detail .gallery,
.product-detail .desktop-main,
.product-detail .mobile-slider {
    min-width: 0;
}

.product-detail .gallery {
    align-items: start;
    gap: 12px;
}

.product-detail .thumbs {
    flex: 0 0 64px;
    gap: 10px;
}

.product-detail .thumbs img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
}

.product-detail .desktop-main {
    flex: 1;
}

.product-detail .desktop-main img,
.product-detail .m-slide img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
    transform: none;
}

.product-detail .desktop-main img:hover {
    transform: none;
}

.product-detail .product-title {
    margin: 0 0 12px;
    color: #333;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.product-detail .price-wrap,
.product-detail .product-info > .price {
    margin: 0 0 16px;
}

.product-detail .price-new,
.product-detail .product-info > .price {
    font-size: 22px;
    line-height: 1.6;
}

.product-detail .price-line {
    gap: 8px;
    margin-bottom: 4px;
}

.product-detail .price-old {
    font-size: 13px;
    font-weight: 400;
    opacity: 1;
}

.product-detail .price-badge {
    gap: 4px;
    padding: 5px 8px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 8px;
}

.product-detail .price-badge-percent {
    padding: 0;
    background: transparent;
    font: inherit;
}

.product-detail .features-box {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 12px;
}

.product-detail .features-box h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.7;
}

.product-detail .features-box ul {
    margin: 0;
}

.product-detail .features-box li {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.product-detail .buy-section {
    display: block;
    position: relative;
    margin-bottom: 12px;
}

.product-detail .add-to-cart-form {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.product-detail .product-size-box {
    margin-bottom: 12px;
}

.product-detail .product-size-select {
    min-width: 0;
    max-width: 100%;
    border-radius: 10px;
}

/* The separate wishlist POST form shares the action row without nesting forms. */
.product-detail .buy-actions {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding-inline-end: 58px;
}

.product-detail .buy-actions .quantity-box {
    display: flex;
    justify-content: space-between;
    width: 132px;
    height: 48px;
    padding: 1px;
    border: 1px solid #ded4e0;
    border-radius: 10px;
    box-shadow: none;
}

.product-detail .quantity-box .qty-btn {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    font-size: 20px;
    box-shadow: none;
}

.product-detail .quantity-box input {
    min-width: 0;
    width: 38px;
    height: 44px;
    font-size: 16px;
}

.product-detail .add-btn {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
    font-size: 15px;
    line-height: 1.7;
    white-space: normal;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(153, 64, 153, .12);
}

.product-detail .product-wishlist-form {
    position: absolute;
    inset-inline-end: 0;
    bottom: 0;
    width: 48px;
    transform: none;
}

.product-detail .product-wishlist-btn {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none;
}

.product-detail .product-wishlist-btn.active {
    background: rgba(153, 64, 153, .09);
}

.product-detail .product-purchase-support {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 13px;
    line-height: 1.8;
}

.product-purchase-support a {
    color: #6f6272;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-detail .product-tabs {
    max-width: 960px;
    margin: 32px auto;
}

.product-detail .product-tabs:not(.details-initialized) .tabs-body .detail-section:not(:first-child) .tab-content {
    display: none;
}

.product-detail .tabs-body {
    content-visibility: auto;
    contain-intrinsic-size: auto 900px;
}

.product-detail .tabs-scroll-hint {
    display: none;
}

/* The strip scrolls independently so long labels cannot widen the page. */
.product-detail .tabs-header {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e8e1e9;
    max-width: 100%;
    overflow-x: auto;
}

.product-detail .tab-btn {
    flex-shrink: 0;
    padding: 12px 18px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: #fff;
    color: #625a65;
}

.product-detail .tab-btn.active {
    color: #7f2a7d;
    border-bottom-color: #7f2a7d;
}
.product-detail .tab-content {
    padding: 24px 0;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
.product-detail .tab-content[hidden] {
    display: none;
}
.product-detail .product-description img, .product-detail .product-description video, .product-detail .product-description iframe {
    max-width: 100%;
    height: auto;
}
.product-detail .product-description table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}
.product-detail .spec-list {
    margin: 0;
}
.product-detail .spec-list > div {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr);
    gap: 16px;
    padding: 12px;
    border-bottom: 1px solid #eee;
}
.product-detail .spec-list dt {
    font-weight: 600;
}
.product-detail .spec-list dd {
    margin: 0;
}
.product-detail .faq-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.product-detail .faq-item h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #7f2a7d;
}
.product-detail .faq-item p {
    margin: 0;
}
.product-detail .review-heading, .product-detail .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.product-detail .review-heading {
    margin-bottom: 20px;
}
.product-detail .review-heading h2 {
    margin: 0;
    font-size: 18px;
}
.product-detail .review-heading p {
    margin: 4px 0 0;
    color: #625a65;
}
.product-detail .review-open, .product-detail .review-btn {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 10px;
}
.product-detail .review-box, .product-detail .review-empty {
    padding: 18px;
    margin: 0 0 12px;
    border: 1px solid #e8e1e9;
    border-radius: 12px;
}
.product-detail .review-empty {
    background: #faf8fb;
    color: #625a65;
}
.product-detail .review-comment {
    margin: 12px 0 0;
}
.product-detail .stars-display {
    color: #7f2a7d;
}
.product-detail .video-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}
.product-detail .video-box {
    width: 280px;
    max-width: 100%;
}
.product-detail .video-box video {
    width: 100%;
    max-height: 400px;
    border-radius: 12px;
    background: #000;
}
.product-detail .video-title {
    text-align: center;
}
.product-detail .product-related {
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
    max-width: 960px;
    margin: 32px auto;
}
.product-detail .product-related .spg-strip {
    background: #fff;
    padding: 0;
}
.product-detail .product-related .spg-strip__wrap {
    padding-inline: 0;
}
.product-detail .product-related .spg-strip__nav {
    display: none;
}
.product-detail .product-related .spg-strip__scroller {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.product-detail .product-related .spg-card {
    min-width: 0;
    max-width: none;
}
.product-detail .product-related .spg-strip__head h2 {
    font-size: 18px;
}
.product-modal-open {
    overflow: hidden;
}
.product-detail .review-modal, .lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.product-detail .review-modal.active, .lightbox.active {
    display: flex;
}
.product-detail .review-modal-bg, .lightbox-bg {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / .5);
}
.product-detail .review-modal-box {
    position: relative;
    width: calc(100% - 32px);
    max-width: 440px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 36px rgb(45 24 49 / .16);
    overscroll-behavior: contain;
}

.product-detail .review-modal-bg {
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.product-detail .review-modal-box h3 {
    margin: 0 0 20px;
    padding-inline-end: 36px;
    font-size: 20px;
}
.product-detail .review-close {
    position: absolute;
    inset-inline-end: 12px;
    top: 12px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: #f7f3f8;
    font-size: 28px;
}
.product-detail .review-modal-box input:not([type="hidden"]), .product-detail .review-modal-box textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #ded4e0;
    border-radius: 8px;
    font-size: 16px;
}
.product-detail .review-modal-box textarea {
    min-height: 110px;
    resize: vertical;
}
.product-detail .rating-wrap {
    margin-bottom: 16px;
}
.product-detail .rating-stars {
    display: flex;
}
.product-detail .rating-stars button {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 30px;
}
.product-detail .rating-stars button.active {
    color: #7f2a7d;
}
.product-detail .review-btn {
    width: 100%;
}
.lightbox #lightbox-img {
    position: relative;
    max-width: 90%;
    max-height: 90dvh;
    border-radius: 12px;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    font-size: 30px;
    background: #fff;
}

@media (max-width: 768px) {
    .product-detail .product-wrapper {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        margin: 20px 0;
    }

    .product-detail .gallery {
        display: flex;
        align-items: stretch;
        gap: 6px;
        flex-direction: column;
    }

    .product-detail .mobile-slider {
        width: 100%;
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .product-detail .desktop-only, .product-detail .desktop-main {
        display: none;
    }
    .product-detail .m-slide {
        flex: 0 0 100%;
        min-width: 0;
        scroll-snap-align: start;
    }
    .product-detail .mobile-slider::-webkit-scrollbar {
        display: none;
    }

    .product-detail .mobile-dots {
        margin-top: 4px;
        display: flex;
        justify-content: center;
    }

    .product-detail .mobile-dots .dot {
        width: 32px;
        height: 32px;
        border: 0;
        background: transparent;
        padding: 12px;
    }
    .product-detail .mobile-dots .dot::before {
        content: "";
        display: block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ded4e0;
    }
    .product-detail .mobile-dots .dot.active::before {
        background: #7f2a7d;
    }
    .product-detail .detail-navigation {
        position: sticky;
        top: var(--product-header-offset, 52px);
        z-index: 100;
        background: #fff;
        padding-block: 4px;
    }
    .product-detail .tabs-header {
        gap: 4px;
        padding: 4px 2px;
        scrollbar-width: thin;
        scrollbar-color: #c9a7cb #f7f3f8;
        overscroll-behavior-x: contain;
    }
    .product-detail .tab-btn {
        min-height: 48px;
        padding: 10px 14px;
        white-space: nowrap;
    }
    .product-detail .tab-btn.active {
        background: #faf5ff;
        font-weight: 700;
    }
    .product-detail .tabs-scroll-hint:not([hidden]) {
        display: block;
        margin: 4px 0 0;
        font-size: 11px;
        color: #6f6272;
    }
    .product-detail .product-related .spg-strip__scroller {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .product-detail .tab-content {
        padding: 4px 0 20px;
    }
    .wishlist-toast {
        bottom: 100px;
    }

    .product-detail .product-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .product-detail .features-box {
        margin-bottom: 16px;
    }

    .product-detail .buy-actions {
        grid-template-columns: minmax(0, 1fr) 48px;
        padding-inline-end: 0;
    }

    .product-detail .buy-actions .quantity-box {
        grid-column: 1 / -1;
    }

    .product-detail .add-btn {
        grid-column: 1;
    }
}
