@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

html,
body,
button,
input,
select,
textarea {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
}

.product-detail-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: #fbf7ec;
    color: #222;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-size: 14px;
}

    .product-detail-page a {
        color: inherit;
        text-decoration: none;
    }

.pd-container {
    width: min(1320px, 92%);
    max-width: 100%;
    margin: 0 auto;
}

.pd-detail {
    padding: 56px 0 70px;
}

.pd-layout {
    min-width: 0;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 56px;
    align-items: start;
}

.pd-gallery {
    min-width: 0;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.pd-thumb-list {
    order: 2;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(103, 141, 57, 0.45) transparent;
    cursor: grab;
    user-select: none;
}

.pd-thumb-list.is-dragging {
    cursor: grabbing;
}

.pd-thumb-list::-webkit-scrollbar {
    height: 5px;
}

.pd-thumb-list::-webkit-scrollbar-track {
    background: transparent;
}

.pd-thumb-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(103, 141, 57, 0.42);
}

.pd-thumb {
    flex: 0 0 92px;
    width: 92px;
    height: 92px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

    .pd-thumb img {
        width: 100%;
        /*height: 100%;*/
        object-fit: cover;
    }

    .pd-thumb.is-active,
    .pd-thumb:hover {
        border-color: #678d39;
        transform: translateY(-1px);
    }

.pd-main-image {
    order: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 5;
    max-height: 720px;
    border-radius: 4px;
    background: #fff7ef;
    overflow: hidden;
    cursor: zoom-in;
}

    .pd-main-image img {
        width: 100%;
        height: 100%;
        padding: 18px;
        object-fit: contain;
        object-position: center center;
    }

    .pd-main-image:focus-visible {
        outline: 3px solid rgba(103, 141, 57, 0.55);
        outline-offset: 4px;
    }

.pd-sale-badge {
    position: absolute;
    top: 22px;
    left: 22px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 24px;
    border-radius: 999px;
    color: #fff;
    background: #c84646;
    box-shadow: 0 10px 24px rgba(184, 63, 63, 0.24);
    font-size: 15px;
    font-weight: 800;
}

.pd-sale-badge--small {
    top: 14px;
    left: 14px;
    min-height: 30px;
    padding: 6px 12px;
    font-size: 13px;
}

.pd-info {
    min-width: 0;
    max-width: 100%;
    padding-top: 6px;
    font-size: 13px;
}

.pd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: #8f8a82;
    font-size: 12px;
}

    .pd-breadcrumb a:hover {
        color: #678d39;
    }

.pd-title {
    margin: 0 0 8px;
    overflow-wrap: anywhere;
    color: #050505;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.12;
}

.pd-code {
    margin: -2px 0 10px;
    color: #777;
    font-size: 12px;
}

.pd-price-box {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 10px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ded3c1;
}

.pd-price-new {
    color: #5f8537;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-size: 22px;
    font-weight: 700;
}

.pd-price-old {
    color: #8c9581;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-size: 15px;
    text-decoration: line-through;
}

.pd-stock {
    flex-basis: 100%;
    color: #777;
    font-size: 12px;
}

    .pd-stock.is-empty {
        color: #b54444;
        font-weight: 800;
    }

.pd-tabs {
    min-width: 0;
    max-width: 100%;
}

    .pd-tabs input[type="radio"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.pd-tab-labels {
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e1d7c6;
    overflow-x: auto;
}

    .pd-tab-labels label {
        padding: 0 0 8px;
        border-bottom: 3px solid transparent;
        color: #a9a197;
        font-family: 'Inter', Arial, Helvetica, sans-serif;
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
        cursor: pointer;
    }

#pd-tab-desc:checked ~ .pd-tab-labels label[for="pd-tab-desc"],
#pd-tab-info:checked ~ .pd-tab-labels label[for="pd-tab-info"],
#pd-tab-material:checked ~ .pd-tab-labels label[for="pd-tab-material"],
#pd-tab-size:checked ~ .pd-tab-labels label[for="pd-tab-size"] {
    color: #222;
    border-bottom-color: #678d39;
}

.pd-tab-content {
    max-width: 100%;
    overflow-wrap: anywhere;
    display: none;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 4px;
    background: #fff8f0;
}

#pd-tab-desc:checked ~ .pd-desc-content,
#pd-tab-info:checked ~ .pd-info-content,
#pd-tab-material:checked ~ .pd-material-content,
#pd-tab-size:checked ~ .pd-size-content {
    display: block;
}

.pd-tab-content h3 {
    margin-bottom: 8px;
    color: #4f742e;
    font-size: 15px;
}

.pd-tab-content p {
    margin-bottom: 8px;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

.pd-tab-content ul,
.pd-tab-content ol {
    margin: 0 0 8px;
    padding-left: 20px;
}

.pd-tab-content li {
    margin-bottom: 4px;
    line-height: 1.5;
}

.pd-richtext {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

    .pd-richtext p,
    .pd-richtext ul,
    .pd-richtext ol {
        margin: 0 0 8px;
    }

    .pd-richtext li {
        margin-bottom: 4px;
    }

    .pd-richtext img {
        max-width: 100%;
        height: auto;
    }

.pd-info-table,
.pd-size-guide table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

    .pd-info-table th,
    .pd-info-table td,
    .pd-size-guide th,
    .pd-size-guide td {
        padding: 9px 10px;
        border-bottom: 1px solid #e0d7c8;
        font-size: 12.5px;
        line-height: 1.45;
        text-align: left;
        vertical-align: top;
    }

    .pd-info-table th,
    .pd-size-guide th {
        width: 34%;
        color: #4f742e;
        font-weight: 800;
    }

.pd-size-guide {
    padding: 16px;
    background: #fdecee;
}

    .pd-size-guide h3 {
        margin-bottom: 12px;
        color: #678d39;
        font-size: 18px;
        text-align: center;
    }

    .pd-size-guide table + table {
        margin-top: 12px;
    }

.pd-options {
    margin-top: 18px;
}

.pd-option-group {
    margin-bottom: 14px;
}

.pd-option-title {
    display: block;
    margin-bottom: 7px;
    color: #333;
    font-size: 12px;
    font-weight: 800;
}

.pd-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

    .pd-choice-list input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .pd-choice-list label {
        min-width: 52px;
        min-height: 32px;
        padding: 5px 12px;
        border: 1px solid #cfc4b3;
        border-radius: 999px;
        background: #fff;
        color: #555;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 600;
        transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

        .pd-choice-list input:checked + label,
        .pd-choice-list label:hover {
            color: #fff;
            border-color: #678d39;
            background: #678d39;
        }

.pd-color-dot {
    width: 18px;
    height: 18px;
    border: 1px solid #cfc4b3;
    border-radius: 50%;
    background: var(--choice-color, #fff);
}

.pd-color-choice--hex {
    min-width: 34px;
    width: 34px;
    min-height: 34px;
    padding: 0;
}

.pd-choice-list input:checked + label.pd-color-choice--hex {
    background: #fff;
    border-color: #678d39;
    color: #222;
    box-shadow: 0 0 0 3px rgba(103, 141, 57, 0.22);
}

    .pd-choice-list input:checked + label.pd-color-choice--hex .pd-color-dot {
        border-color: #678d39;
    }

.pd-variant-message {
    min-height: 18px;
    margin-top: -4px;
    color: #b54444;
    font-size: 12px;
}

.pd-cart-row {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}

.quantity-control,
.pd-quantity {
    width: 132px;
    height: 42px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    border: 1px solid #cfc4b3;
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

    .pd-quantity button,
    .pd-quantity input {
        border: 0;
        background: transparent;
        color: #222;
        text-align: center;
        outline: none;
        font-size: 13px;
    }

        .pd-quantity input::-webkit-outer-spin-button,
        .pd-quantity input::-webkit-inner-spin-button {
            margin: 0;
            -webkit-appearance: none;
        }

        .pd-quantity input[type="number"] {
            -moz-appearance: textfield;
        }

    .pd-quantity button {
        cursor: pointer;
        font-size: 16px;
        font-weight: 800;
    }


/* Mobile overflow and quantity hardening */
.quantity-control,
.pd-quantity {
    width: 132px;
    height: 42px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    align-items: center;
    border: 1px solid #cfc4b3;
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

    .quantity-control button,
    .quantity-control input,
    .pd-quantity button,
    .pd-quantity input {
        width: 100%;
        height: 100%;
        min-width: 0;
        border: 0;
        background: transparent;
        color: #222;
        text-align: center;
        outline: none;
        font-family: 'Inter', Arial, Helvetica, sans-serif;
        font-size: 13px;
        font-weight: 600;
    }

    .quantity-control button,
    .pd-quantity button {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 16px;
        font-weight: 800;
        line-height: 1;
    }

    .quantity-control input::-webkit-outer-spin-button,
    .quantity-control input::-webkit-inner-spin-button,
    .pd-quantity input::-webkit-outer-spin-button,
    .pd-quantity input::-webkit-inner-spin-button {
        margin: 0;
        -webkit-appearance: none;
    }

    .quantity-control input[type="number"],
    .pd-quantity input[type="number"] {
        -moz-appearance: textfield;
    }

.pd-action-btn {
    min-height: 42px;
    border: 1px solid #678d39;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .pd-action-btn:disabled {
        cursor: not-allowed;
        opacity: 0.55;
    }

.pd-action-btn--cart {
    color: #4f742e;
    background: #fff;
}

.pd-action-btn--buy {
    color: #fff;
    background: #678d39;
}

    .pd-action-btn--cart:hover:not(:disabled),
    .pd-action-btn--buy:hover:not(:disabled) {
        color: #fff;
        background: #4f742e;
    }

.pd-related {
    max-width: 100%;
    overflow-x: hidden;
    padding: 70px 0 90px;
    background: #fffaf0;
}

.pd-section-title {
    margin-bottom: 36px;
    text-align: center;
}

    .pd-section-title span {
        color: #678d39;
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 1.5px;
        text-transform: uppercase;
    }

    .pd-section-title h2 {
        margin-top: 8px;
        color: #111;
        font-family: 'Inter', Arial, Helvetica, sans-serif;
        font-size: 32px;
        font-weight: 800;
    }

.pd-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.pd-product-card {
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

    .pd-product-card:hover {
        box-shadow: 0 18px 38px rgba(24, 61, 51, 0.14);
        transform: translateY(-6px);
    }

.pd-product-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fbf7ec;
}

    .pd-product-image img {
        width: 100%;
        height: 360px;
        padding: 12px;
        object-fit: contain;
        object-position: center center;
        transition: transform .35s ease;
    }

    .pd-product-card:hover .pd-product-image img {
        transform: scale(1.035);
    }

.pd-card-content {
    padding: 18px;
}

.pd-card-status {
    margin-bottom: 6px;
    color: #b54444;
    font-size: 13px;
    font-weight: 800;
}

.pd-card-content h3 {
    min-height: 48px;
    margin-bottom: 10px;
    color: #111;
    font-size: 16px;
}

.pd-card-content .product-color-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 18px;
    margin: 8px 0 10px;
}

.pd-card-content .product-color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 50%;
}

.pd-card-content .product-color-text,
.pd-card-content .product-color-more {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    color: #183d33;
    background: #fff;
    font-size: 12px;
    line-height: 1;
}

.pd-size-guide-image {
    display: block;
    width: 100%;
    max-width: 760px;
    height: auto;
    margin: 0 auto;
    border-radius: 6px;
}

.pd-size-guide-content {
    max-width: 760px;
    margin: 18px auto 0;
    color: #33433b;
    font-size: 14px;
    line-height: 1.8;
}

.pd-empty-note {
    margin: 0;
    color: #777;
    text-align: center;
}

.pd-card-price {
    color: #5f8537;
    font-weight: 800;
}

    .pd-card-price del {
        margin-left: 5px;
        color: #999;
        font-weight: 400;
    }

@media (hover: none) {
    .pd-product-card:hover {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
        transform: none;
    }

    .pd-product-card:hover .pd-product-image img {
        transform: none;
    }
}

.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 72px 92px;
    background: rgba(8, 14, 12, 0.88);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.pd-lightbox.is-open {
    display: flex;
    opacity: 1;
}

.pd-lightbox-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 1320px);
    height: min(100%, 82vh);
    overflow: hidden;
    border-radius: 16px;
    cursor: default;
    touch-action: none;
}

.pd-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: center;
    transition: transform 0.16s ease;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}

.pd-lightbox-img.is-draggable {
    cursor: grab;
}

.pd-lightbox-img.is-dragging {
    cursor: grabbing;
    transition: none;
}

.pd-lightbox-close,
.pd-lightbox-nav,
.pd-lightbox-tools button {
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    background: rgba(24, 61, 51, 0.72);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    cursor: pointer;
}

.pd-lightbox-close {
    position: absolute;
    top: 22px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

.pd-lightbox-nav {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 64px;
    border-radius: 999px;
    font-size: 44px;
    line-height: 1;
    transform: translateY(-50%);
}

.pd-lightbox-prev {
    left: 24px;
}

.pd-lightbox-next {
    right: 24px;
}

.pd-lightbox-tools {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: inline-flex;
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-50%);
    backdrop-filter: blur(8px);
}

.pd-lightbox-tools button {
    min-width: 44px;
    height: 38px;
    border-radius: 999px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 800;
}

.pd-lightbox-close:hover,
.pd-lightbox-nav:hover,
.pd-lightbox-tools button:hover {
    background: #c84646;
}

body.pd-lightbox-lock {
    overflow: hidden;
}

@media (max-width: 1100px) {
    .pd-layout {
        grid-template-columns: 1fr;
    }

    .pd-gallery {
        grid-template-columns: minmax(0, 1fr);
    }

    .pd-thumb {
        flex-basis: 84px;
        width: 84px;
        height: 84px;
    }

    .pd-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .pd-container {
        width: 100%;
        max-width: 100%;
        padding: 0 14px;
    }

    .pd-detail {
        padding: 28px 0 46px;
    }

    .pd-layout {
        width: 100%;
        max-width: 100%;
        gap: 28px;
        overflow: hidden;
    }

    .pd-gallery {
        width: 100%;
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        overflow: hidden;
    }

    .pd-main-image {
        order: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 0;
        aspect-ratio: 4 / 5;
        border-radius: 4px;
    }

        .pd-main-image img {
            display: block;
            width: 100%;
            height: 100%;
            min-height: 0;
            padding: 14px;
            object-fit: contain;
            object-position: center center;
        }

    .pd-sale-badge {
        top: 18px;
        left: 18px;
        min-height: 36px;
        padding: 8px 18px;
        font-size: 13px;
    }

    .pd-thumb-list {
        order: 2;
        width: 100%;
        max-width: 100%;
        flex-direction: row;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 0 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .pd-thumb {
        flex: 0 0 68px;
        min-width: 68px;
        width: 68px;
        height: 68px;
        border-radius: 50%;
    }

    .pd-info {
        width: 100%;
        max-width: 100%;
        padding-top: 0;
    }

    .pd-breadcrumb {
        gap: 7px;
        font-size: 12px;
    }

    .pd-title {
        font-size: 24px;
        line-height: 1.2;
    }

    .pd-price-new {
        font-size: 20px;
    }

    .pd-price-old {
        font-size: 14px;
    }

    .pd-tab-labels {
        width: 100%;
        max-width: 100%;
        gap: 22px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

        .pd-tab-labels::-webkit-scrollbar {
            display: none;
        }

        .pd-tab-labels label {
            flex: 0 0 auto;
            font-size: 13px;
        }

    .pd-tab-content,
    .pd-size-guide {
        width: 100%;
        max-width: 100%;
        padding: 14px;
    }

        .pd-tab-content h3,
        .pd-tab-content p,
        .pd-tab-content li,
        .pd-richtext {
            overflow-wrap: anywhere;
            word-break: normal;
        }

    .pd-cart-row {
        width: 100%;
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .pd-quantity,
    .quantity-control {
        width: 112px;
        height: 40px;
        max-width: 100%;
    }

    .pd-action-btn {
        width: 100%;
    }

    .pd-related {
        padding: 48px 0 68px;
    }

    .pd-section-title h2 {
        font-size: 26px;
    }

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

    .pd-lightbox {
        padding: 64px 14px 86px;
    }

    .pd-lightbox-stage {
        width: 100%;
        height: 72vh;
        border-radius: 10px;
    }

    .pd-lightbox-close {
        top: 14px;
        right: 14px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .pd-lightbox-nav {
        top: auto;
        bottom: 24px;
        width: 42px;
        height: 42px;
        font-size: 32px;
        transform: none;
    }

    .pd-lightbox-prev {
        left: 14px;
    }

    .pd-lightbox-next {
        right: 14px;
    }

    .pd-lightbox-tools {
        bottom: 24px;
        gap: 6px;
        padding: 6px;
    }

    .pd-lightbox-tools button {
        min-width: 38px;
        height: 34px;
        padding: 0 10px;
        font-size: 13px;
    }
}
