.product-page {
    --product-ink: #222;
    --product-muted: #727272;
    --product-line: #dedede;
    --product-sale: #e52d26;
    width: min(1170px, calc(100% - 52px));
    margin: 0 auto;
    padding: 24px 0 76px;
    color: var(--product-ink);
}

.product-breadcrumbs {
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 0 0 30px;
    color: #8a8a8a;
    font-size: 13px;
}

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

.product-breadcrumbs a:hover {
    color: #222;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(330px, 1fr);
    gap: clamp(32px, 4vw, 60px);
    align-items: start;
}

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

.product-gallery__main {
    position: relative;
    display: grid;
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
    background: #f2f0eb;
}

.product-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery__empty {
    color: #aaa;
    font-size: 11px;
    letter-spacing: .16em;
}

.product-sale-badge {
    position: absolute;
    z-index: 2;
    top: 15px;
    right: 15px;
    padding: 7px 11px;
    color: #fff;
    background: var(--product-sale);
    font-size: 12px;
}

.product-gallery__thumbs-shell {
    position: relative;
    margin-top: 20px;
    padding: 0 35px;
}

.product-gallery__thumbs-viewport { overflow: hidden; }

.product-gallery__thumbs {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    transition: transform .35s ease;
    will-change: transform;
}

.product-gallery__thumb {
    flex: 0 0 calc((100% - 40px) / 3);
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    border: 1px solid transparent;
    opacity: 1;
    background: #f1f0eb;
    cursor: pointer;
    transition: border-color .2s ease, opacity .2s ease;
}

.product-gallery__thumb:hover,
.product-gallery__thumb.is-active {
    border-color: #222;
    opacity: 1;
}

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

.product-gallery__arrow { position: absolute; z-index: 2; top: 50%; display: grid; width: 30px; height: 30px; padding: 0; color: #111; background: transparent; border: 0; border-radius: 50%; cursor: pointer; place-items: center; transform: translateY(-50%); }
.product-gallery__arrow span { font-size: 28px; font-weight: 300; line-height: 1; }
.product-gallery__arrow--previous { left: -9px; }
.product-gallery__arrow--next { right: -9px; }
.product-gallery__arrow:disabled { opacity: .25; cursor: default; }
.product-gallery__arrow[hidden] { display: none; }

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

.product-info__vendor {
    margin: 0 0 8px;
    color: var(--product-muted);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.product-info h1 {
    margin: 0 0 14px;
    color: #191919;
    font-size: clamp(30px, 3.2vw, 46px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.15;
}

.product-description {
    color: #454545;
    font-size: 15px;
    line-height: 1.9;
}

.product-description > :first-child {
    margin-top: 0;
}

.product-description h2 {
    margin: 25px 0 9px;
    font-size: 21px;
    line-height: 1.45;
}

.product-description h3 {
    margin: 8px 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.85;
}

.product-description h4 {
    margin: 20px 0 8px;
    font-size: 14px;
}

.product-description p {
    margin: 10px 0;
}

.product-description img {
    max-width: 100%;
    height: auto;
}

.product-price {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin: 25px 0 21px;
}

.product-price strong {
    font-size: 22px;
    font-weight: 500;
}

.product-price__compare {
    color: #858585;
    font-size: 16px;
    text-decoration: line-through;
}

.product-options {
    margin: 0;
    padding: 0;
    border: 0;
}

.product-options legend {
    margin-bottom: 12px;
    font-size: 14px;
}

.product-options__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.product-options__buttons button {
    min-height: 43px;
    padding: 9px 14px;
    border: 1px solid #bdbdbd;
    color: #333;
    background: #fff;
    cursor: pointer;
}

.product-options__buttons button[aria-pressed="true"] {
    border-color: #222;
    box-shadow: inset 0 0 0 1px #222;
}

.product-options__buttons button:disabled {
    color: #7d7d7d;
    border-color: #c8c8c8;
    background: #f2f2f2;
    opacity: .72;
    cursor: not-allowed;
}

.product-stock {
    margin: 13px 0 0;
    font-size: 12px;
}

.product-stock.is-in-stock {
    color: #47703d;
}

.product-stock.is-out-of-stock {
    color: #9a4539;
}

.product-purchase {
    margin-top: 23px;
}

.product-purchase[hidden] ~ .product-add-button {
    margin-top: 24px;
}

.product-purchase > label {
    display: block;
    margin-bottom: 9px;
    font-size: 14px;
}

.product-quantity {
    display: grid;
    width: 118px;
    grid-template-columns: 36px 46px 36px;
    border: 1px solid #d4d4d4;
}

.product-quantity button,
.product-quantity input {
    width: 100%;
    height: 43px;
    border: 0;
    color: #333;
    background: #fff;
    text-align: center;
}

.product-quantity button {
    font-size: 19px;
    cursor: pointer;
}

.product-quantity input {
    appearance: textfield;
    outline: 0;
    font-size: 13px;
}

.product-quantity input::-webkit-inner-spin-button {
    display: none;
}

.product-subtotal {
    margin: 13px 0 25px;
    font-size: 14px;
}

.product-add-button {
    width: 100%;
    min-height: 51px;
    border: 1px solid #222;
    color: #fff;
    background: #222;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

.product-add-button:hover:not(:disabled) {
    color: #222;
    background: #fff;
}

.product-add-button:disabled {
    border-color: #aaa;
    background: #aaa;
    cursor: not-allowed;
}

.product-cart-feedback {
    min-height: 20px;
    margin: 9px 0 0;
    color: #765d23;
    font-size: 12px;
}

.product-share {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 13px 0;
    border: 0;
    border-top: 1px solid var(--product-line);
    border-bottom: 1px solid var(--product-line);
    color: #333;
    background: transparent;
    cursor: pointer;
}

.related-products {
    margin-top: 100px;
    padding-top: 31px;
    border-top: 1px solid var(--product-line);
}

.related-products__heading {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 28px;
    align-items: center;
    margin-bottom: 35px;
}

.related-products__heading span {
    height: 1px;
    background: var(--product-line);
}

.related-products__heading h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
}

.related-products__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.related-product-card a {
    color: inherit;
    text-decoration: none;
}

.related-product-card__image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0eee8;
}

.related-product-card__image > span {
    position: absolute;
    z-index: 1;
    top: 11px;
    right: 11px;
    padding: 5px 8px;
    color: #fff;
    background: var(--product-sale);
    font-size: 10px;
}

.related-product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.related-product-card:hover img {
    transform: scale(1.025);
}

.related-product-card h3 {
    margin: 15px 0 7px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
}

.related-product-card p {
    display: flex;
    gap: 9px;
    margin: 0;
    font-size: 13px;
}

.related-product-card del {
    color: #999;
}

@media (max-width: 1024px) {
    .product-page {
        width: min(100% - 32px, 720px);
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .product-gallery {
        width: min(100%, 600px);
        margin-inline: auto;
    }

    .product-gallery__main {
        aspect-ratio: 4 / 3;
    }

    .product-gallery__thumbs-shell { padding-inline: 30px; }
    .product-gallery__arrow--previous { left: -5px; }
    .product-gallery__arrow--next { right: -5px; }

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

@media (max-width: 520px) {
    .product-page {
        width: calc(100% - 24px);
        padding-top: 14px;
    }

    .product-breadcrumbs {
        padding-bottom: 18px;
        overflow: hidden;
        font-size: 11px;
        white-space: nowrap;
    }

    .product-info h1 {
        font-size: 30px;
    }

    .product-description {
        font-size: 14px;
        line-height: 1.8;
    }

    .product-gallery__thumbs-shell { margin-top: 12px; padding-inline: 24px; }
    .product-gallery__thumbs { gap: 9px; }
    .product-gallery__thumb { flex-basis: calc((100% - 18px) / 3); }
    .product-gallery__arrow { width: 26px; height: 26px; }
    .product-gallery__arrow span { font-size: 24px; }

    .related-products {
        margin-top: 66px;
    }

    .related-products__grid {
        gap: 14px;
    }

    .related-product-card h3 {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-gallery__thumb,
    .product-add-button,
    .related-product-card img {
        transition: none;
    }
}

/* Original Shopify purchase-control parity - 2026-07-21 */
.product-options__buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0;
    margin-top: 5px;
}

.product-options__buttons button {
    box-sizing: border-box;
    min-width: 0;
    height: 40px;
    margin: 0 10px 10px 0;
    padding: 0 10px;
    border: 1px solid #cbcbcb;
    border-radius: 0;
    background: #fff;
    color: #232323;
    box-shadow: none;
    font-family: Roboto, "Noto Sans TC", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 40px;
    text-transform: capitalize;
    transition: color .3s, background-color .3s, border-color .3s;
}

.product-options__buttons button:hover,
.product-options__buttons button[aria-pressed="true"] {
    border-color: #232323;
    background: #fff;
    color: #232323;
    box-shadow: none;
}

.product-options__buttons button:disabled,
.product-options__buttons button:disabled:hover,
.product-options__buttons button:disabled[aria-pressed="true"] {
    color: #8a8a8a;
    border-color: #d2d2d2;
    background: #f2f2f2;
    box-shadow: none;
    opacity: .72;
    cursor: not-allowed;
}

.product-options__buttons button:active {
    transform: none;
}

.product-quantity {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 110px;
    height: 43px;
    border: 0;
    background: transparent;
}

.product-quantity input {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    width: 110px;
    height: 43px;
    margin: 0;
    padding: 10px 30px 9px;
    border: 1px solid #c7c7c7;
    border-radius: 0;
    background: #fff;
    color: #232323;
    font: 400 16px/22px Roboto, "Noto Sans TC", sans-serif;
    text-align: center;
    appearance: textfield;
}

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

.product-quantity button {
    position: absolute;
    top: 0;
    z-index: 2;
    width: 30px;
    height: 43px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #232323;
    box-shadow: none;
    font-size: 0;
    transition: opacity .15s ease;
}

.product-quantity button[data-quantity-minus] {
    left: 0;
}

.product-quantity button[data-quantity-plus] {
    right: 0;
}

.product-quantity button::before,
.product-quantity button[data-quantity-plus]::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 1px;
    background: currentColor;
    content: "";
    transform: translate(-50%, -50%);
}

.product-quantity button[data-quantity-plus]::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.product-quantity button:hover {
    background: transparent;
    color: #232323;
}

.product-quantity button:active {
    opacity: .55;
    transform: none;
}

.product-gallery__main img {
    transform: none !important;
    transition: none !important;
}

.product-quantity button:disabled,
.product-quantity input:disabled {
    color: #8a8a8a;
    background: #f2f2f2;
    cursor: not-allowed;
}

.product-add-button {
    box-sizing: border-box;
    height: 50px;
    padding: 13px 15px;
    font: 700 16px/22px Roboto, "Noto Sans TC", sans-serif;
    transform-origin: 50% 50%;
    transition: color .5s cubic-bezier(.25, .46, .45, .94),
                background .5s cubic-bezier(.25, .46, .45, .94),
                background-color .5s cubic-bezier(.25, .46, .45, .94),
                border .5s cubic-bezier(.25, .46, .45, .94);
    animation: product-horizontal-shaking 6s ease 5s infinite;
}

.product-add-button:active {
    transform: translateZ(0);
}

.product-add-button:disabled {
    animation: none;
}

@keyframes product-horizontal-shaking {
    0%, 18%, 100% { transform: translateZ(0); }
    2%, 6%, 10%, 14% { transform: translate3d(-5px, 0, 0); }
    4%, 8%, 12%, 16% { transform: translate3d(5px, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .product-add-button {
        animation: none;
    }

    .product-gallery__main img,
    .product-options__buttons button {
        transition-duration: .01ms !important;
    }
}

/* Promotional product price */
.product-price .product-price__compare:not([hidden]) + [data-current-price] {
    color: #e1251b;
}
