/* ── Design System ───────────────────────────────────── */
:root {
    --color-bg: #ffffff;
    --color-heading: #111827;
    --color-body: #6b7280;
    --color-muted: #9ca3af;
    --color-border: #e5e7eb;
    --color-border-lt: #f3f4f6;
    --color-topbar: #1e1e1e;
    --color-btn-primary: #111827;
    --color-danger: #dc2626;
    --color-success: #16a34a;
    --font-family: "Instrument Sans", sans-serif;
}

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

body.detail-page {
    background: var(--color-bg);
    font-family: var(--font-family);
    color: var(--color-body);
    margin: 0;
}

/* ── Container ───────────────────────────────────────── */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Back Navigation ─────────────────────────────────── */
.back-nav-wrap {
    padding: 20px 0 0;
}

.back-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.15s;
}

.back-nav:hover {
    opacity: 0.7;
}

/* ── Detail Layout ───────────────────────────────────── */
.detail-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 24px 0 64px;
}

.detail-left {
    flex: 1;
    min-width: 0;
}

/* ── Hero Image ──────────────────────────────────────── */
.hero-image-wrapper {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-border);
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(17, 24, 39, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--color-bg);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    letter-spacing: 0.2px;
}

/* ── Meta (category – hotel) ─────────────────────────── */
.voucher-meta {
    font-size: 14px;
    color: var(--color-body);
    margin: 0 0 16px;
}

/* ── Title & Price ───────────────────────────────────── */
.voucher-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.2;
    margin: 0 0 8px;
}

.voucher-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
}

.price-row-with-discount {
    display: flex;
    align-items: center;
    gap: 8px;
}

.voucher-price-original {
    font-size: 16px;
    font-weight: 400;
    color: var(--color-muted);
    text-decoration: line-through;
}

.voucher-discount-percent {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-bg);
    background: var(--color-danger);
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

.voucher-price {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-heading);
    margin: 0;
}

/* ── Validity Row ────────────────────────────────────── */
.validity-row {
    display: flex;
    gap: 24px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.validity-row .label {
    font-size: 12px;
    color: var(--color-body);
    margin: 0 0 4px;
}

.validity-row .value {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-heading);
    margin: 0;
}

/* ── Description ─────────────────────────────────────── */
.section-description {
    margin-bottom: 24px;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-heading);
    margin: 0 0 12px;
}

.section-description p {
    font-size: 14px;
    color: var(--color-body);
    line-height: 1.7;
    margin: 0;
}

#voucherDescription,
#voucherDescription * {
    font-family: "Instrument Sans", sans-serif !important;
}

/* ── Terms Accordion ─────────────────────────────────── */
.section-terms {
    margin-bottom: 32px;
}

.terms-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: none;
    cursor: pointer;
    font-family: var(--font-family);
}

.terms-toggle .section-label {
    margin: 0;
}

.chevron-icon {
    flex-shrink: 0;
    color: var(--color-body);
    transition: transform 0.2s ease;
}

.terms-body {
    padding-top: 16px;
}

.terms-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terms-body li {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: var(--color-body);
    margin-bottom: 10px;
    line-height: 1.6;
}

.term-num {
    color: var(--color-heading);
    flex-shrink: 0;
    font-weight: 500;
}

/* ── Booking Card ────────────────────────────────────── */
.booking-card {
    width: 384px;
    flex-shrink: 0;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.booking-card__header {
    padding: 20px 20px 16px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.booking-card__header h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: var(--color-heading);
    margin: 0;
}

.booking-card__header p {
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: var(--color-body);
    margin: 4px 0 0;
}

.booking-card__body {
    padding: 20px;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Form Elements ───────────────────────────────────── */
.form-group label,
.form-group__label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.05em;
    color: var(--color-body);
    margin-bottom: 8px;
}

input[type="date"],
.date-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-size: 14px;
    color: var(--color-heading);
    font-family: var(--font-family);
    outline: none;
    background: var(--color-bg);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

input[type="date"]:focus,
.date-input:focus {
    border-color: var(--color-heading);
}

/* ── Flatpickr overrides ─────────────────────────────── */
.flatpickr-input.form-control,
.flatpickr-input[readonly] {
    cursor: pointer;
}

.flatpickr-calendar {
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    font-family: var(--font-family);
    border: 1px solid var(--color-border);
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--color-heading);
    border-color: var(--color-heading);
    border-radius: 0;
}

.flatpickr-day:hover {
    border-radius: 0;
}

.flatpickr-day.today {
    border-color: var(--color-heading);
}

.flatpickr-day.today:hover {
    background: var(--color-heading);
    color: var(--color-bg);
    border-radius: 0;
}

.field-error {
    font-size: 12px;
    color: var(--color-danger);
    margin-top: 6px;
}

.divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 0;
}

.divider-light {
    border: none;
    border-top: 1px solid var(--color-border-lt);
    margin: 4px 0;
}

/* ── Counter ─────────────────────────────────────────── */
.counter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.counter-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-heading);
    margin: 0 0 2px;
}

.counter-sublabel {
    font-size: 12px;
    color: var(--color-muted);
    margin: 0;
}

.counter-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.counter-btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--color-border);
    background: none;
    cursor: pointer;
    font-size: 18px;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: var(--font-family);
    transition: opacity 0.15s;
}

.counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#adultCount,
#childCount {
    width: 24px;
    text-align: center;
    font-weight: 600;
    color: var(--color-heading);
    font-size: 14px;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn-primary {
    background: var(--color-btn-primary);
    color: var(--color-bg);
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: opacity 0.15s;
    border-radius: 6px;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.88;
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
}

/* ── Price Summary ───────────────────────────────────── */
.summary-heading {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-heading);
    margin: 0 0 12px;
    letter-spacing: 0.03em;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--color-body);
    margin-bottom: 16px;
}

.summary-price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.summary-price-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.summary-old-price {
    font-size: 12px;
    color: var(--color-muted);
    text-decoration: line-through;
}

.summary-final-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-heading);
}

.summary-total-row {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 0;
    margin-top: 4px;
}

.summary-hint {
    font-size: 12px;
    color: var(--color-muted);
    margin: 0;
    text-align: center;
}

/* ── Booking Note ────────────────────────────────────── */
.booking-note {
    font-size: 12px;
    color: var(--color-muted);
    text-align: center;
    margin: 0;
}

/* ── Related / Carousel Section ──────────────────────── */
.related-section {
    margin-top: 48px;
    padding-top: 40px;
    padding-bottom: 64px;
    border-top: 1px solid var(--color-border);
}

.related-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.related-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-heading);
    margin: 0 0 4px;
}

.related-subtitle {
    font-size: 14px;
    color: var(--color-body);
    margin: 0;
}

.carousel-nav {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.carousel-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-heading);
    transition: background 0.15s;
}

.carousel-btn:hover {
    background: var(--color-border-light);
}

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.voucher-card-wrap {
    flex-shrink: 0;
    width: 220px;
}

/* ── Voucher Card (partial) ──────────────────────────── */
.vc-card {
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vc-img-wrap {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    overflow: hidden;
    margin-bottom: 12px;
    display: block;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vc-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.vc-card:hover .vc-img {
    transform: scale(1.03);
}

.vc-discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-danger);
    color: var(--color-bg);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.vc-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vc-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.375;
}

.vc-hotel {
    font-size: 12px;
    color: var(--color-text-body);
    margin: 0;
}

.vc-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0 0 8px;
}

.vc-price {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: var(--color-primary);
    margin: 0;
}

.vc-original-price {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-muted);
    margin: 0;
    text-decoration: line-through;
}

.vc-btn {
    width: 100%;
    padding: 8px 16px;
    background: var(--color-primary);
    color: var(--color-bg);
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    display: block;
    border-radius: 6px;
}

.vc-btn:hover {
    opacity: 0.88;
}

/* ── FAB ─────────────────────────────────────────────── */
.scroll-to-booking-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding-block: 12px;
    padding-inline: 42px;
    border-radius: 6px;
    background: var(--color-btn-primary);
    color: var(--color-bg);
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    z-index: 40;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-family);
    letter-spacing: 0.02em;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.scroll-to-booking-btn.show {
    display: flex;
    animation:
        fab-enter 0.3s ease forwards,
        fab-pulse 2.4s ease-in-out 0.3s infinite;
}

.scroll-to-booking-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1023px) {
    .scroll-to-booking-btn {
        left: 0;
        right: 0;
        bottom: 24px;
        width: fit-content;
        margin: 0 auto;
    }
}

@keyframes fab-enter {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fab-pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.32);
    }
}

/* ── Not Found State ─────────────────────────────────── */
.not-found-state {
    text-align: center;
    padding: 128px 24px;
}

.not-found-state p {
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 12px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1023px) {
    .detail-layout {
        flex-direction: column;
        gap: 16px;
    }

    .booking-card {
        width: 100%;
    }
}

@media (max-width: 639px) {
    .detail-container {
        padding: 0 16px;
    }

    .voucher-title {
        font-size: 24px;
    }

    .voucher-price {
        font-size: 20px;
    }

    .related-header {
        flex-direction: column;
        gap: 12px;
    }

    .voucher-card-wrap {
        width: 180px;
    }
}

/* ── Detail Skeleton ─────────────────────────────── */
@keyframes dsk-shimmer {
    0% {
        background-position: -600px 0;
    }
    100% {
        background-position: 600px 0;
    }
}

.dsk-back,
.dsk-img,
.dsk-card,
.dsk-line {
    background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
    background-size: 1200px 100%;
    animation: dsk-shimmer 1.4s infinite linear;
    border-radius: 8px;
}

#detailSkeleton .detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
    padding: 32px 0 64px;
}

.dsk-back {
    height: 20px;
    width: 160px;
    margin: 24px 0 32px;
}
.dsk-img {
    width: 100%;
    padding-bottom: 75%;
    border-radius: 12px;
}
.dsk-card {
    height: 480px;
    border-radius: 16px;
}
.dsk-line {
    height: 14px;
    margin-top: 16px;
}
.dsk-line--meta {
    width: 40%;
}
.dsk-line--title {
    width: 70%;
    height: 28px;
    margin-top: 8px;
}
.dsk-line--price {
    width: 30%;
    height: 22px;
}
.dsk-line--validity {
    width: 55%;
}
.dsk-line--desc {
    width: 100%;
}
.dsk-line--desc-short {
    width: 65%;
}

@media (max-width: 768px) {
    #detailSkeleton .detail-layout {
        grid-template-columns: 1fr;
    }
    .dsk-card {
        display: none;
    }
}

/* ── Related: See All Card ───────────────────────── */
.vc-card--see-all {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: var(--color-border-light);
    border: 2px dashed var(--color-disabled);
    border-radius: 12px;
    height: 100%;
    min-height: 200px;
    transition:
        border-color 0.2s,
        background 0.2s;
}

.vc-card--see-all:hover {
    border-color: var(--color-text-body);
    background: var(--color-border-light);
}

.vc-see-all-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
}
