#product-detail .pd-reserve-trigger svg { width: 21px; height: 21px; }
#product-detail .pd-gallery, #product-detail .pd-info { min-width: 0; }
#product-detail .pd-reserve-trigger-note { font-size: 0.75rem; font-weight: 400; opacity: 0.85; }
#product-detail .csr-overlay[x-cloak],
#product-detail .csr-slip-viewer[x-cloak],
#product-detail .csr-dialog [x-cloak] { display: none !important; }

/* Bound to the content viewport so the sidebar and header stay available. */
#product-detail .csr-overlay {
    position: fixed;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 2vw, 28px);
    background: rgba(49, 36, 29, 0.42);
    backdrop-filter: blur(2px);
    overscroll-behavior: contain;
}
#product-detail .csr-dialog {
    display: flex;
    flex-direction: column;
    width: min(1040px, 100%);
    height: min(860px, 100%);
    max-height: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    background: #fffaf6;
    box-shadow: 0 24px 80px rgba(37, 25, 17, 0.28);
    color: var(--pd-text);
    font-size: 0.9rem;
    line-height: 1.65;
}
#product-detail .csr-dialog-body { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
#product-detail .csr-dialog button,
#product-detail .csr-dialog input,
#product-detail .csr-dialog select,
#product-detail .csr-dialog textarea { font: inherit; }
#product-detail .csr-dialog button { cursor: pointer; }
#product-detail .csr-dialog button:focus-visible,
#product-detail .csr-dialog input:focus-visible,
#product-detail .csr-dialog select:focus-visible,
#product-detail .csr-dialog textarea:focus-visible,
#product-detail .pd-reserve-trigger:focus-visible { outline: 3px solid #e8945a; outline-offset: 3px; }
#product-detail .csr-dialog svg { width: 20px; height: 20px; flex-shrink: 0; }
#product-detail .csr-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; border-bottom: 1px solid #eddfd4; background: #fff; }
#product-detail .csr-header h2 { margin: 0; font-size: 1.3rem; font-weight: 700; color: #4a3428; }
#product-detail .csr-text-button { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0; border: 0; background: transparent; color: #9b512b; font-weight: 600; }
#product-detail .csr-close { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid #ecddd2; border-radius: 50%; background: white; color: #85644f; }
#product-detail .csr-close:hover { background: #fff0e5; }
#product-detail .csr-layout { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
#product-detail .csr-main { flex: 1; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; padding: 1.25rem 1.5rem 1.5rem; scrollbar-gutter: stable; }
#product-detail .csr-card { border: 1px solid #eddfd4; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px #4a342805; }
#product-detail .csr-form,
#product-detail .csr-review { padding: 1.5rem; }
#product-detail .csr-card-heading { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1.5rem; }
#product-detail .csr-card-heading h3 { margin: 0 0 0.15rem; font-size: 1.05rem; font-weight: 600; color: #4a3428; }
#product-detail .csr-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
#product-detail .csr-field { display: block; min-width: 0; font-size: 0.83rem; font-weight: 600; }
#product-detail .csr-field-wide { grid-column: 1 / -1; }
#product-detail .csr-field input, #product-detail .csr-field select, #product-detail .csr-field textarea { display: block; width: 100%; min-width: 0; margin-top: 0.45rem; padding: 0.75rem 0.9rem; border: 1px solid #e5dcd4; border-radius: 9px; background: #fffdfa; color: #4a3428; font-size: 0.85rem; font-weight: 400; }
#product-detail .csr-field input[required], #product-detail .csr-field select[required] { background: #fff1f2; }
#product-detail .csr-field input::placeholder { color: #ac9c90; }
#product-detail .csr-field input:focus, #product-detail .csr-field select:focus, #product-detail .csr-field textarea:focus { border-color: #c96f32; }
#product-detail .csr-bank-info { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid #e5edfa; border-radius: 14px; background: #f7faff; }
#product-detail .csr-bank-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-bottom: 0.75rem; border-radius: 12px; background: #e8f0ff; color: #2864f0; }
#product-detail .csr-bank-icon svg { width: 22px; height: 22px; }
#product-detail .csr-bank-info h3 { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 600; color: #243a58; }
#product-detail .csr-bank-info p { margin: 0; color: #526885; font-size: 0.9rem; line-height: 1.8; overflow-wrap: anywhere; }
#product-detail .csr-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
#product-detail .csr-booking-price { display: grid; gap: 0.25rem; color: #927b6a; font-size: 0.85rem; }
#product-detail .csr-booking-price strong { color: #b75c26; font-size: 1.35rem; }
#product-detail .csr-primary { display: inline-flex; align-items: center; justify-content: center; gap: 1rem; min-height: 46px; padding: 0.75rem 1.25rem; border: 0; border-radius: 10px; color: white; background: linear-gradient(115deg, #e97821, #fa8d3b); font-weight: 600; box-shadow: 0 5px 14px #e9782126; }
#product-detail .csr-primary:hover { background: #d76b19; }
#product-detail .csr-summary {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 2;
    width: 80%;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 1.25rem;
    border-right: 1px solid #eddfd4;
    background: #fffaf6;
    box-shadow: 10px 0 28px rgba(74, 52, 40, 0.12);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 180ms ease, visibility 180ms;
}
#product-detail .csr-summary.is-open { transform: translateX(0); visibility: visible; }
#product-detail .csr-summary .pd-image-fallback { width: 100%; min-height: 0; padding: 1rem; }
#product-detail .csr-content-toolbar { flex-shrink: 0; padding: 0.65rem 1.5rem; }
#product-detail .csr-summary-toggle { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 36px; padding: 0.4rem 0.8rem; border: 1px solid #e4c6ae; border-radius: 8px; background: #fff; color: #a45c2d; font-weight: 600; }
#product-detail .csr-summary-toggle:hover, #product-detail .csr-summary-toggle[aria-expanded=true] { background: #fff0e4; }
#product-detail .csr-summary-backdrop { position: absolute; inset: 0; z-index: 1; background: rgba(49, 36, 29, 0.2); }
#product-detail .csr-summary-heading .csr-close { width: 30px; height: 30px; margin-left: auto; }
#product-detail .csr-summary-heading .csr-close svg { width: 16px; height: 16px; }
#product-detail .csr-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 1.5rem; font-size: 0.78rem; color: #8a7568; }
#product-detail .csr-summary-heading .csr-course-code { margin: 0; }
#product-detail .csr-course-code { margin: 0 0 0.4rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em; color: #ba6d39; }
#product-detail .csr-review-details { display: grid; gap: 1rem; }
#product-detail .csr-review-details dt { font-weight: 400; color: #9a8575; font-size: 0.78rem; }
#product-detail .csr-review-details dd { margin: 0.2rem 0 0; overflow-wrap: anywhere; }
#product-detail .csr-preview-notice { margin-top: 1.5rem; padding: 1rem; background: #fff7ed; border: 1px solid #efdbc4; border-radius: 10px; color: #9c642e; font-size: 0.83rem; }

@media (max-width: 1100px) {
    #product-detail .csr-fields { grid-template-columns: minmax(0, 1fr); }
    #product-detail .csr-form-footer { align-items: stretch; flex-direction: column; }
}
@media (max-width: 800px) {
    #product-detail .csr-dialog { border-radius: 14px; }
    #product-detail .csr-header { padding: 0.85rem 1rem; }
    #product-detail .csr-main { padding: 1rem; }
    #product-detail .csr-content-toolbar { padding: 0.65rem 1rem; }
    #product-detail .csr-summary-heading { margin-bottom: 0.75rem; }
    #product-detail .csr-form, #product-detail .csr-review, #product-detail .csr-summary { padding: 1.1rem; }
    #product-detail .pd-reserve-trigger { flex-wrap: wrap; }
}

#product-detail .csr-prefix { max-width: 150px; }
#product-detail .csr-field textarea { resize: vertical; }
#product-detail .csr-pending { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 6px; background: #fff1df; color: #9c692b; font-size: 0.76rem; }
#product-detail .csr-multiline { white-space: pre-wrap; }
@media (prefers-reduced-motion: reduce) {
    #product-detail .csr-summary { transition: none; }
}

#product-detail .csr-options { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
#product-detail .csr-options label { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.88rem; }
#product-detail .csr-options input { width: 18px; height: 18px; margin: 0; accent-color: #c96f32; }
#product-detail .csr-field input[type=file] { font-size: 0.8rem; }
#product-detail .csr-slip-attachment { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; }
#product-detail .csr-slip-open { display: grid; justify-items: center; gap: 0.35rem; padding: 0.5rem; border: 1px solid #e4c6ae; border-radius: 9px; background: #fffaf6; color: #a45c2d; font-size: 0.75rem; }
#product-detail .csr-slip-open img { width: 64px; height: 88px; object-fit: contain; }
#product-detail .csr-slip-name { min-width: 0; overflow-wrap: anywhere; color: #8a7568; font-size: 0.8rem; }
#product-detail .csr-slip-attachment > .csr-slip-name { flex: 1; }
#product-detail .csr-slip-viewer { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: clamp(12px, 2vw, 28px); background: rgba(35, 27, 23, 0.65); backdrop-filter: blur(3px); }
#product-detail .csr-slip-viewer-panel { display: flex; flex-direction: column; width: min(780px, 100%); height: min(780px, 100%); overflow: hidden; border: 1px solid #e8d8cb; border-radius: 16px; background: #fff; box-shadow: 0 24px 80px #0005; }
#product-detail .csr-slip-viewer button { font: inherit; cursor: pointer; }
#product-detail .csr-slip-viewer button:focus-visible { outline: 3px solid #e8945a; outline-offset: 3px; }
#product-detail .csr-slip-viewer svg { width: 20px; height: 20px; }
#product-detail .csr-slip-viewer .csr-header > div { min-width: 0; }
#product-detail .csr-slip-viewer .csr-header .csr-slip-name { margin: 0.25rem 0 0; }
#product-detail .csr-slip-viewer .csr-close { flex-shrink: 0; }
#product-detail .csr-slip-viewer-image { display: flex; flex: 1; min-height: 0; align-items: center; justify-content: center; overflow: auto; padding: 1rem; background: #f6f2ee; }
#product-detail .csr-slip-viewer-image img { max-width: 100%; max-height: 100%; object-fit: contain; }

#product-detail .csr-form-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
#product-detail .csr-optional { font-size: 0.75rem; font-weight: 400; color: #998477; }
#product-detail .csr-options label { flex-wrap: wrap; }
#product-detail .csr-file-hint { display: block; margin-top: 0.4rem; color: #998477; font-size: 0.73rem; font-weight: 400; }
#product-detail .csr-form-errors { margin-bottom: 1rem; padding: 0.8rem 1rem; border: 1px solid #efc6ba; border-radius: 10px; background: #fff2ee; color: #a13f2e; font-size: 0.85rem; }
#product-detail .csr-form-errors p { margin: 0.25rem 0; }
#product-detail .csr-primary:disabled, #product-detail .csr-close:disabled { opacity: 0.6; cursor: wait; }
#product-detail .csr-receipt-viewer[x-cloak] { display: none !important; }
#product-detail .csr-receipt-viewer { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: clamp(12px, 2vw, 28px); background: rgba(49, 36, 29, 0.38); backdrop-filter: blur(3px); }
#product-detail .csr-receipt-panel { display: flex; flex-direction: column; width: min(820px, 100%); max-height: 100%; overflow: hidden; border: 1px solid #ead9cb; border-radius: 20px; background: #fff; box-shadow: 0 24px 80px #30221955; }
#product-detail .csr-receipt-panel button { font: inherit; cursor: pointer; }
#product-detail .csr-receipt-panel button:focus-visible { outline: 3px solid #e8945a; outline-offset: 3px; }
#product-detail .csr-receipt-panel svg { width: 22px; height: 22px; }
#product-detail .csr-receipt-body { min-height: 0; overflow: auto; padding: 1.5rem; }
#product-detail .csr-receipt-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
#product-detail .csr-receipt-check { display: grid; place-items: center; flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; background: #edf7ed; color: #3f8550; }
#product-detail .csr-receipt-check svg { width: 30px; height: 30px; }
#product-detail .csr-receipt-hero p { margin: 0 0 0.2rem; color: #917b6b; font-size: 0.8rem; }
#product-detail .csr-receipt-hero strong { margin-right: 0.8rem; font-size: 1.4rem; color: #4a3428; }
#product-detail .csr-receipt-course { padding: 1.1rem 1.25rem; margin-bottom: 1.4rem; border: 1px solid #efddcd; border-radius: 12px; background: #fff7f0; }
#product-detail .csr-receipt-course > span { color: #b16b39; font-size: 0.75rem; }
#product-detail .csr-receipt-course h3 { margin: 0.25rem 0 0.6rem; color: #4a3428; font-size: 1.15rem; font-weight: 700; }
#product-detail .csr-receipt-course > div { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.8rem; }
#product-detail .csr-receipt-course p { margin: 0.35rem 0 0; font-size: 0.8rem; }
#product-detail .csr-receipt-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.75rem; margin: 0; }
#product-detail .csr-receipt-details > div { min-width: 0; padding: 0.75rem 0; border-bottom: 1px solid #f1e9e1; }
#product-detail .csr-receipt-details dt, #product-detail .csr-receipt-payment dt { margin: 0 0 0.25rem; color: #998477; font-size: 0.76rem; font-weight: 400; }
#product-detail .csr-receipt-details dd, #product-detail .csr-receipt-payment dd { margin: 0; overflow-wrap: anywhere; color: #4a3428; font-size: 0.9rem; line-height: 1.6; }
#product-detail .csr-receipt-details .csr-receipt-name dd { font-size: 1rem; font-weight: 600; }
#product-detail .csr-receipt-payment { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1rem; margin: 1.1rem 0 0; padding: 1rem 1.1rem; border: 1px solid #efddcd; border-radius: 12px; background: #fffaf6; }
#product-detail .csr-receipt-payment > div { min-width: 0; }
#product-detail .csr-receipt-payment .csr-receipt-price dd { color: #b76228; font-size: 1.3rem; font-weight: 700; }
#product-detail .csr-receipt-slip { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 96px; padding: 4px; border: 1px solid #e4c6ae; border-radius: 8px; background: #fffaf6; }
#product-detail .csr-receipt-slip img { display: block; width: 100%; height: 100%; object-fit: contain; }
#product-detail .csr-receipt-slip:hover { border-color: #c96f32; background: #fff3e8; }
#product-detail .csr-receipt-footer { display: flex; flex-shrink: 0; justify-content: flex-end; padding: 1rem 1.5rem; border-top: 1px solid #eee2d8; }
.swal2-container.ttt-booking-alert { z-index: 20000 !important; }
@media (max-width: 600px) {
    #product-detail .csr-receipt-body { padding: 1rem; }
    #product-detail .csr-receipt-details { grid-template-columns: minmax(0, 1fr); }
    #product-detail .csr-receipt-hero strong { display: block; font-size: 1.2rem; }
}
