.order-status-grid,
.admin-order-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.order-status-grid div,
.admin-order-summary div,
.order-detail-card,
.checkout-slip-card,
.order-payment-panel,
.order-panels section {
    padding: 16px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.order-status-grid span,
.admin-order-summary span {
    display: block;
    margin-bottom: 6px;
    color: var(--color-muted);
    font-size: 13px;
}

.order-status-grid strong,
.admin-order-summary strong {
    overflow-wrap: anywhere;
}

.order-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: -4px 0 18px;
}

.order-actions-bar [data-order-cancel-message] {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.order-actions-bar [data-order-cancel-message].is-success {
    color: var(--color-green);
}

.button-secondary.order-cancel-open {
    border-color: #b91c1c;
    background: #b91c1c;
    color: #fff;
    font-weight: 800;
}

.button-secondary.order-cancel-open:hover,
.button-secondary.order-cancel-open:focus-visible {
    border-color: #991b1b;
    background: #991b1b;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
}

.checkout-slip-card {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.order-detail-card {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.order-detail-card h2 {
    margin: 0;
    font-size: 20px;
}

.order-items-card .table-wrap {
    margin: 0;
}

.order-payment-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

.order-payment-panel h2,
.order-payment-panel h3 {
    margin: 0;
}

.order-payment-panel p {
    margin: 0;
    color: var(--color-muted);
}

.payment-panel-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 12px;
}

.payment-panel-heading .section-kicker,
.payment-panel-heading h2 {
    grid-column: 1;
}

.payment-fee-button {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
}

.payment-method-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.payment-method-grid button {
    display: grid;
    height: 96px;
    min-height: 96px;
    align-content: center;
    justify-items: start;
    gap: 4px;
    padding: 14px;
    border-color: var(--color-line);
    background: #fff;
    color: var(--color-ink);
    text-align: left;
}

.payment-method-grid button img {
    width: 56px;
    height: 42px;
    object-fit: contain;
}

.payment-method-grid .qr-promptpay-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #1d4d9e;
    background: #1d4d9e;
    color: #fff;
}

.payment-method-grid .qr-promptpay-method img {
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.payment-method-grid .qr-promptpay-method:hover,
.payment-method-grid .qr-promptpay-method:focus-visible {
    border-color: #1d4d9e;
    box-shadow: 0 0 0 3px rgba(29, 77, 158, 0.18);
}

.payment-method-grid .card-token-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #19206f;
    background: #19206f;
    color: #fff;
}

.payment-method-grid .card-token-method img {
    width: 58px;
    height: 44px;
    object-fit: contain;
    background: transparent;
}

.payment-method-grid .card-token-method:hover,
.payment-method-grid .card-token-method:focus-visible {
    border-color: #f7b600;
    box-shadow: 0 0 0 3px rgba(247, 182, 0, 0.24);
}

.payment-method-grid .card-installments-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.payment-method-grid .card-installments-method img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    background: #fff;
}

.payment-method-grid .card-installments-method:hover,
.payment-method-grid .card-installments-method:focus-visible {
    border-color: #64748b;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.16);
}

.payment-method-grid .scb-easy-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #4b2d85;
    background: #4b2d85;
    color: #fff;
}

.payment-method-grid .scb-easy-method img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: transparent;
}

.payment-method-grid .scb-easy-method:hover,
.payment-method-grid .scb-easy-method:focus-visible {
    border-color: #4b2d85;
    box-shadow: 0 0 0 3px rgba(75, 45, 133, 0.18);
}

.payment-method-grid .krungsri-app-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #ffde59;
    background: #ffde59;
    color: #1b1f2e;
}

.payment-method-grid .krungsri-app-method img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: contain;
    background: transparent;
}

.payment-method-grid .krungsri-app-method:hover,
.payment-method-grid .krungsri-app-method:focus-visible {
    border-color: #ffde59;
    box-shadow: 0 0 0 3px rgba(255, 222, 89, 0.35);
}

.payment-method-grid .line-pay-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #06c755;
    background: #06c755;
    color: #fff;
}

.payment-method-grid .line-pay-method img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: contain;
    background: transparent;
}

.payment-method-grid .line-pay-method:hover,
.payment-method-grid .line-pay-method:focus-visible {
    border-color: #06c755;
    box-shadow: 0 0 0 3px rgba(6, 199, 85, 0.2);
}

.payment-method-grid .shopee-pay-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #ed4c2e;
    background: #ed4c2e;
    color: #fff;
}

.payment-method-grid .shopee-pay-method img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: contain;
    background: transparent;
}

.payment-method-grid .shopee-pay-method:hover,
.payment-method-grid .shopee-pay-method:focus-visible {
    border-color: #ed4c2e;
    box-shadow: 0 0 0 3px rgba(237, 76, 46, 0.2);
}

.payment-method-grid .spay-later-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #ee4d2d;
    background: #ee4d2d;
    color: #fff;
}

.payment-method-grid .spay-later-method img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: contain;
    background: transparent;
}

.payment-method-grid .spay-later-method:hover,
.payment-method-grid .spay-later-method:focus-visible {
    border-color: #ee4d2d;
    box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.2);
}

.payment-method-grid .true-money-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #ff6f00;
    background: #ff6f00;
    color: #fff;
}

.payment-method-grid .true-money-method img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: contain;
    background: transparent;
}

.payment-method-grid .true-money-method:hover,
.payment-method-grid .true-money-method:focus-visible {
    border-color: #ff6f00;
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.2);
}

.payment-method-grid .bangkok-bank-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #0264fe;
    background: #0264fe;
    color: #fff;
}

.payment-method-grid .bangkok-bank-method img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: contain;
    background: transparent;
}

.payment-method-grid .bangkok-bank-method:hover,
.payment-method-grid .bangkok-bank-method:focus-visible {
    border-color: #0264fe;
    box-shadow: 0 0 0 3px rgba(2, 100, 254, 0.2);
}

.payment-method-grid .kplus-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #01a950;
    background: #01a950;
    color: #fff;
}

.payment-method-grid .kplus-method img {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    object-fit: contain;
    background: transparent;
}

.payment-method-grid .kplus-method:hover,
.payment-method-grid .kplus-method:focus-visible {
    border-color: #01a950;
    box-shadow: 0 0 0 3px rgba(1, 169, 80, 0.2);
}

.payment-method-grid button:hover,
.payment-method-grid button:focus-visible {
    border-color: var(--color-cyan);
    box-shadow: 0 0 0 3px rgba(0, 184, 223, 0.12);
}

.payment-method-grid button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.payment-method-grid button:disabled:hover,
.payment-method-grid button:disabled:focus-visible {
    box-shadow: none;
}

.payment-method-grid [data-mobile-banking-method] {
    grid-template-columns: 72px 1fr;
    align-content: center;
    align-items: center;
}

.payment-method-grid [data-mobile-banking-method].is-device-locked {
    position: relative;
    grid-template-rows: 1fr;
    padding-bottom: 34px;
}

.payment-method-grid [data-mobile-banking-method] img {
    align-self: center;
    justify-self: center;
}

.payment-method-grid [data-mobile-banking-method] strong {
    align-self: center;
}

.payment-method-device-note {
    position: absolute;
    right: 14px;
    bottom: 14px;
    left: 14px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    opacity: 0.92;
}

.payment-method-grid .bank-transfer-method {
    grid-template-columns: auto 1fr;
    align-content: center;
    align-items: center;
    column-gap: 12px;
    border-color: #0f4c81;
    background: #0f4c81;
    color: #fff;
}

.payment-method-grid .bank-transfer-method img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: transparent;
}

.payment-method-grid .bank-transfer-method:hover,
.payment-method-grid .bank-transfer-method:focus-visible {
    border-color: #12aee5;
    box-shadow: 0 0 0 3px rgba(18, 174, 229, 0.22);
}

.payment-powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.payment-powered-by img {
    display: block;
    width: auto;
    height: 16px;
}

.beam-card-dialog {
    width: min(860px, calc(100vw - 40px));
    padding: 32px;
}

.beam-card-form {
    display: grid;
    gap: 18px;
}

.beam-card-amount-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 8px;
}

.beam-card-amount-summary div {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #f8fafc;
}

.beam-card-amount-summary dt {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.beam-card-amount-summary dd {
    color: var(--color-ink);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.2;
}

.beam-card-fee-note {
    margin: -2px 0 12px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.beam-card-fee-note[hidden] {
    display: none;
}

.beam-card-form > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.beam-card-form > div:nth-of-type(2) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.beam-card-form.is-installment > div:nth-of-type(2) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.beam-card-form [hidden] {
    display: none !important;
}

.beam-card-form label {
    display: grid;
    gap: 6px;
    color: var(--color-ink);
    font-weight: 800;
}

.beam-card-form input,
.beam-card-form select {
    box-sizing: border-box;
    height: 58px;
    min-height: 58px;
    max-height: 58px;
    padding: 10px 16px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.beam-card-form select {
    appearance: none;
    padding-right: 42px;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--color-ink) 50%),
        linear-gradient(135deg, var(--color-ink) 50%, transparent 50%);
    background-position:
        calc(100% - 22px) calc(50% - 3px),
        calc(100% - 15px) calc(50% - 3px);
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
}

.beam-card-form > .beam-card-security-note {
    display: flex;
    grid-template-columns: none;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid rgba(82, 145, 94, 0.28);
    border-radius: 8px;
    background: #f1f8f3;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.beam-card-security-note strong {
    flex: 0 0 auto;
    color: var(--color-ink);
    font-size: 14px;
    font-weight: 900;
}

.beam-card-form > .beam-card-bank-logos {
    display: flex;
    grid-template-columns: none;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    padding: 12px 0 2px;
}

.beam-card-bank-logos img {
    display: block;
    width: auto;
    max-width: 112px;
    height: 30px;
    object-fit: contain;
}

.beam-card-form button[type="submit"] {
    width: 100%;
}

.beam-card-form p {
    font-size: 13px;
}

.beam-card-error {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-weight: 800;
}

.beam-card-error[hidden] {
    display: none;
}

.bank-transfer-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: #f8fafc;
}

.bank-transfer-panel dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.bank-transfer-panel div {
    padding: 12px;
    border-radius: 8px;
    background: #fff;
}

.bank-transfer-panel dt {
    margin: 0 0 4px;
    color: var(--color-muted);
    font-size: 13px;
}

.bank-transfer-panel dd {
    margin: 0;
    font-weight: 700;
}

.beam-payment-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding:
        max(20px, env(safe-area-inset-top))
        max(20px, env(safe-area-inset-right))
        max(20px, env(safe-area-inset-bottom))
        max(20px, env(safe-area-inset-left));
    overflow: auto;
    overscroll-behavior: contain;
    background: rgba(10, 20, 34, 0.58);
}

.beam-payment-modal[hidden],
.bank-transfer-panel[hidden] {
    display: none;
}

.beam-payment-dialog {
    position: relative;
    display: grid;
    width: min(480px, 100%);
    max-height: calc(100vh - 40px);
    max-height: calc(
        100dvh
        - max(20px, env(safe-area-inset-top))
        - max(20px, env(safe-area-inset-bottom))
    );
    gap: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 24px 80px rgba(10, 20, 34, 0.3);
    -webkit-overflow-scrolling: touch;
}

.beam-payment-dialog.beam-card-dialog {
    width: min(1040px, 100%);
    max-height: calc(100vh - 40px);
    max-height: calc(
        100dvh
        - max(20px, env(safe-area-inset-top))
        - max(20px, env(safe-area-inset-bottom))
    );
    gap: 20px;
    overflow-y: auto;
    padding: 40px 44px;
}

.beam-payment-dialog.order-cancel-dialog {
    width: min(560px, 100%);
}

.order-cancel-dialog h2,
.order-cancel-dialog p {
    margin: 0;
}

.order-cancel-dialog form {
    display: grid;
    gap: 14px;
}

.order-cancel-dialog label {
    display: grid;
    gap: 6px;
    color: var(--color-ink);
    font-weight: 800;
}

.order-cancel-dialog textarea {
    min-height: 110px;
    resize: vertical;
}

.order-cancel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.order-cancel-confirm {
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius);
    background: #b91c1c;
    color: #fff;
    font-weight: 800;
}

.order-cancel-confirm:hover,
.order-cancel-confirm:focus-visible {
    background: #991b1b;
}

[data-order-cancel-form-message] {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

[data-order-cancel-form-message].is-success {
    color: var(--color-green);
}

[data-order-cancel-form-message].is-error {
    color: #b91c1c;
}

.beam-payment-dialog > span {
    color: var(--color-cyan);
    font-size: 13px;
    font-weight: 800;
}

.beam-charge-qr {
    width: min(280px, 100%);
    margin: 0 auto;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #fff;
}

.beam-payment-dialog code {
    display: block;
    overflow-wrap: anywhere;
    padding: 10px;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--color-muted);
    font-size: 12px;
}

.beam-charge-breakdown,
.payment-fee-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.beam-charge-breakdown div,
.payment-fee-list div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.beam-charge-breakdown dt,
.payment-fee-list dt {
    color: var(--color-muted);
    font-size: 13px;
}

.beam-charge-breakdown dd,
.payment-fee-list dd {
    margin: 0;
    font-weight: 800;
}

.beam-charge-breakdown[hidden] {
    display: none;
}

.payment-installment-rules {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #fff;
}

.payment-installment-rules h3,
.payment-installment-rules p {
    margin: 0;
}

.payment-installment-rules p {
    color: var(--color-muted);
}

.payment-installment-rules dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.payment-installment-rules div {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
}

.payment-installment-rules dt {
    font-weight: 800;
}

.payment-installment-rules dd {
    margin: 0;
    color: var(--color-muted);
}

.beam-payment-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--color-ink);
}

.checkout-slip-card h2,
.order-panels h2 {
    margin: 0;
    font-size: 20px;
}

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

.order-info-panels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.order-info-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.order-info-list div {
    display: grid;
    gap: 4px;
}

.order-info-list dt {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.order-info-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.order-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.order-panels ul {
    margin: 0;
    padding-left: 18px;
}

.payment-slip-list {
    display: grid;
    gap: 12px;
    padding-left: 0 !important;
    list-style: none;
}

.payment-slip-item {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #f8fbff;
}

.payment-slip-meta {
    display: grid;
    gap: 8px;
    margin: 0;
}

.payment-slip-meta div {
    display: grid;
    grid-template-columns: minmax(96px, 0.5fr) minmax(0, 1fr);
    gap: 10px;
}

.payment-slip-meta dt {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.payment-slip-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.empty-state {
    padding: 28px;
}

.empty-state strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

body.has-product-lightbox {
    overflow: hidden;
}

.detail-layout {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    align-items: stretch;
    gap: 24px;
    margin-top: 36px;
    margin-bottom: 56px;
}

.detail-media {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 420px;
    padding: 18px;
}

.detail-media,
.detail-summary-card {
    height: 100%;
}

.detail-summary-card {
    display: flex;
    flex-direction: column;
}

.detail-media > img,
.product-main-image-button img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 330px;
    object-fit: contain;
}

.product-main-image-button {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 0;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    cursor: zoom-in;
}

.product-main-image-button:hover,
.product-gallery-thumbs button:hover,
.product-image-lightbox button:hover,
.product-video-lightbox button:hover {
    transform: none;
    box-shadow: none;
}

.product-main-image-button:focus-visible,
.product-gallery-thumbs button:focus-visible,
.product-image-lightbox button:focus-visible,
.product-video-lightbox button:focus-visible {
    outline: 3px solid rgba(0, 184, 223, 0.42);
    outline-offset: 3px;
}

.product-media img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 14px;
    object-fit: contain;
}

.product-gallery-thumbs {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    justify-content: safe center;
    width: 100%;
    margin-top: 14px;
    padding: 0 4px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.52) transparent;
}

.product-gallery-thumbs::-webkit-scrollbar {
    height: 7px;
}

.product-gallery-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.product-gallery-thumbs::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
}

.product-gallery-thumbs a,
.product-gallery-thumbs button {
    display: block;
    flex: 0 0 auto;
    min-height: 0;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-radius: 8px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    scroll-snap-align: center;
}

.product-gallery-thumbs a.is-primary,
.product-gallery-thumbs button.is-primary {
    border-color: var(--color-cyan);
}

.product-gallery-thumbs img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.product-gallery-thumbs .product-gallery-video-thumb {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.product-gallery-thumbs .product-gallery-video-thumb img {
    width: 58px;
    height: 58px;
    border-radius: 6px;
    object-fit: cover;
    opacity: 0.9;
}

.product-gallery-video-fallback {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 6px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.product-gallery-play-icon {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.product-gallery-play-icon::before {
    content: "";
    width: 30px;
    height: 21px;
    border-radius: 6px;
    background: #ef2f19;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.product-gallery-play-icon::after {
    content: "";
    position: absolute;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid #fff;
    transform: translateX(2px);
}

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

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

.product-image-lightbox,
.product-video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 22px;
}

.product-image-lightbox-backdrop,
.product-video-lightbox-backdrop {
    position: absolute;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(8, 18, 32, 0.72);
    box-shadow: none;
    cursor: zoom-out;
}

.product-image-lightbox-panel,
.product-video-lightbox-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(1120px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.34);
}

.product-video-lightbox-panel {
    width: min(980px, calc(100vw - 32px));
}

.product-image-lightbox-head,
.product-video-lightbox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-line);
}

.product-image-lightbox-head strong,
.product-video-lightbox-head strong {
    min-width: 0;
    overflow: hidden;
    color: var(--color-ink);
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-image-lightbox-head button,
.product-video-lightbox-head button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    min-height: 38px;
    border: 1px solid var(--color-line);
    border-radius: 50%;
    background: #f8fafc;
    box-shadow: none;
    color: var(--color-ink);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.product-image-lightbox-stage,
.product-video-lightbox-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 420px;
    padding: 22px 64px;
    background:
        linear-gradient(90deg, rgba(13, 116, 216, 0.06) 1px, transparent 1px),
        linear-gradient(rgba(13, 116, 216, 0.05) 1px, transparent 1px),
        #f8fbff;
    background-size: 32px 32px, 32px 32px, auto;
}

.product-video-lightbox-stage {
    min-height: 0;
    padding: 0;
    background: #020617;
}

.product-image-lightbox-stage img {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    max-height: calc(100dvh - 150px);
    object-fit: contain;
}

.product-video-lightbox-stage iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.product-lightbox-nav {
    position: absolute;
    top: 50%;
    display: inline-grid;
    place-items: center;
    width: 44px;
    min-height: 44px;
    border: 1px solid rgba(13, 116, 216, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: none;
    color: var(--color-ink);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.product-lightbox-nav.is-prev {
    left: 14px;
}

.product-lightbox-nav.is-next {
    right: 14px;
}

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

.detail-content {
    min-width: 0;
    padding: 28px;
}

.detail-content h1 {
    overflow-wrap: anywhere;
}

.detail-description-card {
    display: grid;
    grid-column: 1 / -1;
    gap: 24px;
    padding: 28px;
}

.detail-description-card h2 {
    margin-bottom: 16px;
    font-size: 24px;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.spec-grid div {
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-soft);
}

dt {
    color: var(--color-muted);
    font-size: 13px;
}

dd {
    margin: 0;
    font-weight: 600;
}

.warranty-value {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warranty-info-control {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.warranty-info-button {
    display: inline-grid;
    width: 44px;
    inline-size: 44px;
    min-width: 44px;
    height: 44px;
    block-size: 44px;
    min-height: 44px;
    padding: 0;
    place-items: center;
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    box-sizing: border-box;
    background: var(--color-surface);
    color: var(--color-muted);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.warranty-info-button[hidden],
.warranty-info-popover[hidden] {
    display: none !important;
}

.warranty-info-button:hover,
.warranty-info-button:focus-visible {
    border-color: var(--color-green);
    color: var(--color-green);
    outline: none;
}

.warranty-info-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 20;
    width: min(430px, calc(100vw - 32px));
    padding: 14px 16px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    color: var(--color-ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    display: grid;
    gap: 8px;
    max-height: min(520px, calc(100vh - 40px));
    max-height: min(520px, calc(100dvh - 40px));
    overflow: auto;
    opacity: 1;
    pointer-events: auto;
    text-align: left;
    transform: none;
}

.warranty-info-popover::after {
    position: absolute;
    right: 6px;
    top: -7px;
    width: 12px;
    height: 12px;
    border-top: 1px solid var(--color-line);
    border-left: 1px solid var(--color-line);
    background: var(--color-surface);
    content: "";
    transform: rotate(45deg);
}

.warranty-info-popover-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.warranty-info-popover-head strong {
    font-size: 15px;
    line-height: 1.4;
}

.warranty-info-popover-head button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-ink);
    box-shadow: none;
    font-size: 24px;
}

@media (max-width: 640px) {
    .warranty-info-popover {
        position: fixed;
        inset:
            max(16px, env(safe-area-inset-top))
            max(16px, env(safe-area-inset-right))
            max(16px, env(safe-area-inset-bottom))
            max(16px, env(safe-area-inset-left));
        width: auto;
        max-height: none;
        overflow: auto;
        transform: none;
        overscroll-behavior: contain;
    }

    .warranty-info-popover::after {
        display: none;
    }

}

.detail-actions {
    display: grid;
    gap: 14px;
    margin-top: auto;
    padding-top: 24px;
}

.detail-actions form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-actions label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-purchase-panel {
    display: grid;
    gap: 12px;
    width: 100%;
}

.detail-purchase-panel[hidden] {
    display: none;
}

.detail-price-line {
    margin: 0;
    color: var(--color-ink);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
}

.detail-quantity-field {
    color: var(--color-ink);
    font-size: 18px;
    font-weight: 800;
}

.detail-quantity-field input {
    width: 122px;
}

.detail-contact-panel {
    align-items: center;
}

.product-combo-card {
    display: grid;
    grid-column: 1 / -1;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.product-combo-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.product-combo-head h2 {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: clamp(20px, 1.6vw, 24px);
}

.product-combo-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.product-combo-list article {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #f8fafc;
}

.product-combo-list strong {
    color: var(--color-ink);
    font-size: 16px;
}

.product-combo-list p,
.product-combo-list ul {
    margin: 0;
}

.product-combo-list ul {
    display: grid;
    gap: 6px;
    padding: 0;
    list-style: none;
}

.product-combo-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    color: var(--color-ink);
    overflow-wrap: anywhere;
}

.product-combo-list li span,
.product-combo-list small {
    color: var(--color-muted);
    font-weight: 800;
}

.product-combo-list .product-combo-matrix {
    grid-column: 1 / -1;
    gap: 10px;
    background: #f8fbfd;
}

.product-combo-matrix-title {
    display: grid;
    gap: 6px;
}

.product-combo-matrix-title p,
.product-combo-matrix-title small {
    margin: 0;
}

.product-combo-matrix-scroll {
    overflow-x: auto;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #fff;
}

.product-combo-matrix-table {
    width: 100%;
    min-width: 660px;
    border-collapse: collapse;
    font-size: 14px;
}

.product-combo-matrix-table th,
.product-combo-matrix-table td {
    padding: 9px 10px;
    border-top: 1px solid var(--color-line);
    vertical-align: top;
    text-align: left;
}

.product-combo-matrix-table thead th {
    border-top: 0;
    color: var(--color-muted);
    font-weight: 900;
    background: #f1f7fb;
}

.product-combo-matrix-table th:not(:first-child),
.product-combo-matrix-table td:not(:first-child) {
    width: 150px;
}

.product-combo-matrix-item {
    display: grid;
    gap: 4px;
}

.product-combo-matrix-offer {
    display: grid;
    gap: 6px;
    min-width: 128px;
}

.product-combo-matrix-offer strong {
    font-size: 14px;
}

.product-combo-matrix-offer form {
    margin: 0;
}

.product-combo-matrix-offer button,
.product-combo-matrix-card button {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-blue), var(--color-green));
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.product-combo-matrix-cards {
    display: none;
}

@media (max-width: 640px) {
    .product-combo-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .product-combo-list article,
    .product-combo-matrix-title,
    .product-combo-matrix-card,
    .product-combo-matrix-item {
        min-width: 0;
    }

    .product-combo-list article > strong,
    .product-combo-matrix-title > strong,
    .product-combo-matrix-title > p,
    .product-combo-matrix-title > small,
    .product-combo-matrix-item > strong,
    .product-combo-matrix-item > small {
        overflow-wrap: anywhere;
    }

    .product-combo-list li {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .product-combo-matrix-scroll {
        display: none;
    }

    .product-combo-matrix-cards {
        display: grid;
        gap: 10px;
    }

    .product-combo-matrix-card {
        display: grid;
        gap: 10px;
        padding: 14px;
        border: 1px solid var(--color-line);
        border-radius: 8px;
        background: #ffffff;
    }

    .product-combo-matrix-card > span,
    .product-combo-matrix-card > strong {
        overflow-wrap: anywhere;
    }

    .product-combo-matrix-card > span:not(.product-combo-matrix-item) {
        color: var(--color-muted);
        font-size: 13px;
        font-weight: 800;
    }

    .product-combo-matrix-card form,
    .product-combo-matrix-card button {
        width: 100%;
        margin: 0;
    }

    .product-combo-matrix-card button {
        min-height: 44px;
    }
}

@media (max-height: 520px) {
    .beam-payment-modal {
        place-items: start center;
        padding:
            max(8px, env(safe-area-inset-top))
            max(8px, env(safe-area-inset-right))
            max(8px, env(safe-area-inset-bottom))
            max(8px, env(safe-area-inset-left));
    }

    .beam-payment-dialog,
    .beam-payment-modal > .beam-payment-dialog.beam-card-dialog {
        max-height: calc(100vh - 16px);
        max-height: calc(
            100dvh
            - max(8px, env(safe-area-inset-top))
            - max(8px, env(safe-area-inset-bottom))
        );
        gap: 14px;
        padding: 56px 16px 16px;
    }

    .product-image-lightbox,
    .product-video-lightbox {
        padding: 8px;
    }

    .product-image-lightbox-panel,
    .product-video-lightbox-panel {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
    }

    .product-image-lightbox-head,
    .product-video-lightbox-head {
        min-height: 56px;
        padding: 6px 10px;
    }

    .product-image-lightbox-head button,
    .product-video-lightbox-head button {
        width: 44px;
        min-height: 44px;
    }

    .product-image-lightbox-stage,
    .product-video-lightbox-stage {
        min-height: 0;
        height: calc(100vh - 72px);
        height: calc(100dvh - 72px);
    }

    .product-image-lightbox-stage {
        padding: 8px 54px;
    }

    .product-image-lightbox-stage img {
        max-height: calc(100vh - 88px);
        max-height: calc(100dvh - 88px);
    }

    .product-video-lightbox-stage iframe {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
    }
}

.product-combo-matrix-empty {
    color: var(--color-muted);
    font-weight: 900;
}

.product-combo-matrix > small {
    display: block;
    color: var(--color-muted);
    font-weight: 800;
}

.product-share-card {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(280px, 500px) 1fr;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #f8fafc;
    box-sizing: border-box;
}

.product-share-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.product-share-head span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.product-share-icon,
.product-share-copy {
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--color-line);
    background: #fff;
    color: var(--color-ink);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.product-share-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.product-share-icon img,
.product-share-copy img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.product-share-icon[data-share-x] img {
    width: 28px;
    height: 28px;
}

.product-share-icon:hover,
.product-share-icon:focus-visible,
.product-share-copy:hover,
.product-share-copy:focus-visible {
    border-color: var(--color-blue);
    color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(13, 116, 216, 0.12);
}

.product-share-link-row {
    display: flex;
    width: 100%;
    max-width: 500px;
    min-width: 0;
}

.product-share-link-row input {
    box-sizing: border-box;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--color-line);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: #fff;
    color: var(--color-ink);
    font: inherit;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-share-copy {
    box-sizing: border-box;
    flex: 0 0 46px;
    width: 46px;
    height: 44px;
    border-radius: 0 8px 8px 0;
    background: var(--color-ink);
    color: #fff;
}

.product-share-copy img {
    filter: brightness(0) invert(1);
}

.product-share-copy:hover,
.product-share-copy:focus-visible {
    background: var(--color-blue);
    color: #fff;
}

.product-share-card small {
    min-height: 16px;
    color: var(--color-blue);
    font-size: 12px;
    font-weight: 800;
}

.product-agreement-card {
    gap: 8px;
    background: #f8fafc;
}

.product-agreement-card h2 {
    margin-bottom: 0;
}

.product-agreement-card .product-rich-content > :first-child {
    margin-top: 0;
}

.product-option-picker {
    display: grid;
    gap: 10px;
    margin: 0 0 8px;
}

.product-option-picker > span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.product-option-picker > div {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.product-option-picker button {
    display: grid;
    flex: 1 1 118px;
    gap: 3px;
    min-width: 0;
    max-width: 260px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--color-ink);
    overflow-wrap: anywhere;
    text-align: left;
    cursor: pointer;
}

.product-option-picker button strong,
.product-option-picker button small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.product-option-picker button.is-active {
    border-color: var(--color-cyan);
    box-shadow: 0 0 0 3px rgba(74, 156, 190, 0.16);
}

.product-option-picker small {
    color: var(--color-muted);
    font-size: 12px;
}
