:root {
    --font-sans: "Jost", "Noto Sans", sans-serif;
    --font-serif: "Cormorant Garamond", serif;
    --cream: #faf7f2;
    --cream-2: #f5f0e8;
    --beige: #e8dfd0;
    --beige-2: #d4c5b0;
    --taupe: #a89b8c;
    --charcoal: #1f1b17;
    --charcoal-2: #2a2622;
    --charcoal-3: #3d3530;
    --gold: #b8946a;
    --gold-light: #c9a876;
    --gold-dark: #8c6e48;
    --white: #fffcf8;
    --radius: 18px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
    background: var(--cream);
}

body {
    font-family: var(--font-sans);
    color: var(--charcoal-3);
    -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] {
    --font-sans: "IBM Plex Sans Arabic", "Jost", sans-serif;
    --font-serif: "Amiri", "Cormorant Garamond", serif;
}

html[dir="rtl"] .q-aside h1,
html[dir="rtl"] .q-brand-mark,
html[dir="rtl"] .q-panel h2,
html[dir="rtl"] .q-title {
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.35;
}

html[dir="rtl"] .q-eyebrow,
html[dir="rtl"] .q-kicker,
html[dir="rtl"] .q-brand small {
    letter-spacing: 0.08em;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.q-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(320px, 42%) 1fr;
}

.q-aside {
    position: relative;
    color: var(--cream-2);
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
}

.q-aside-media {
    position: absolute;
    inset: 0;
}

.q-aside-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.q-aside-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(31, 27, 23, 0.55) 0%, rgba(31, 27, 23, 0.72) 42%, rgba(31, 27, 23, 0.92) 100%),
        radial-gradient(circle at 80% 10%, rgba(201, 168, 118, 0.22), transparent 36%);
}

.q-aside-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 40px 42px 32px;
}

.q-aside-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 40px;
}

.q-lang-dropdown {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 168px;
    flex-shrink: 0;
}

.q-lang-label {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-light);
}

.q-lang-details {
    position: relative;
    width: 100%;
}

.q-lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    list-style: none;
    border: 1px solid rgba(201, 168, 118, 0.4);
    background: rgba(31, 27, 23, 0.45);
    color: var(--cream-2);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    outline: none;
}

.q-lang-toggle::-webkit-details-marker,
.q-lang-toggle::marker {
    display: none;
    content: "";
}

.q-lang-toggle:focus-visible {
    border-color: var(--gold-light);
    box-shadow: 0 0 0 3px rgba(201, 168, 118, 0.18);
}

.q-lang-name {
    flex: 1;
    min-width: 0;
    text-align: start;
}

.q-lang-chevron {
    font-size: 10px;
    color: var(--gold-light);
    transition: transform 0.18s ease;
}

.q-lang-details[open] .q-lang-chevron {
    transform: rotate(180deg);
}

.q-lang-flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.q-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    z-index: 30;
    min-width: 100%;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #1f1b17;
    border: 1px solid rgba(201, 168, 118, 0.28);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(20, 16, 12, 0.35);
}

.q-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--cream-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.q-lang-option:hover,
.q-lang-option.is-active {
    background: rgba(201, 168, 118, 0.16);
}

.q-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 0;
}

.q-brand img,
.q-brand-fallback {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border: 1px solid rgba(201, 168, 118, 0.4);
    padding: 6px;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.q-brand-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--cream-2);
}

.q-brand-fallback span,
.q-brand-mark span {
    color: var(--gold-light);
    margin: 0 3px;
}

.q-brand-mark {
    font-family: var(--font-serif);
    font-size: 28px;
    letter-spacing: 0.08em;
    line-height: 1;
}

.q-brand small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold-light);
}

.q-eyebrow,
.q-kicker {
    color: var(--gold-light);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.q-aside h1 {
    font-family: var(--font-serif);
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 14px;
}

.q-aside p.lead {
    color: var(--beige-2);
    line-height: 1.9;
    font-size: 15px;
    max-width: 36ch;
    margin-bottom: 40px;
}

.q-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.q-steps::before {
    content: "";
    position: absolute;
    top: 17px;
    bottom: 17px;
    right: 17px;
    width: 1px;
    background: rgba(201, 168, 118, 0.28);
}

.q-step {
    display: flex;
    align-items: center;
    gap: 14px;
    background: transparent;
    border: 0;
    color: inherit;
    text-align: right;
    cursor: pointer;
    padding: 12px 0;
    position: relative;
}

.q-step:disabled {
    cursor: default;
    opacity: 0.7;
}

.q-step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 118, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--beige-2);
    flex-shrink: 0;
    background: rgba(31, 27, 23, 0.55);
    z-index: 1;
}

.q-step-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.q-step-meta small {
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--taupe);
}

.q-step-meta strong {
    font-size: 15px;
    font-weight: 600;
    color: rgba(245, 240, 232, 0.72);
}

.q-step.active .q-step-num,
.q-step.done .q-step-num {
    background: var(--gold-light);
    border-color: var(--gold-light);
    color: var(--charcoal);
}

.q-step.active .q-step-meta strong,
.q-step.done .q-step-meta strong {
    color: var(--cream-2);
}

.q-aside-foot {
    margin-top: auto;
    padding-top: 36px;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
}

.q-main {
    padding: 36px 48px 48px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.q-main-inner {
    width: 100%;
    max-width: 860px;
}

.q-progress-wrap {
    margin-bottom: 18px;
}

.q-progress-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--taupe);
    margin-bottom: 8px;
}

.q-progress-bar {
    height: 4px;
    background: var(--beige);
    overflow: hidden;
}

.q-progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
    transition: width 0.35s ease;
}

.q-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--beige);
    box-shadow: 0 24px 70px rgba(31, 27, 23, 0.07);
    padding: 40px 42px 32px;
}

.q-loading {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255, 252, 248, 0.78);
    z-index: 5;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--charcoal);
    font-weight: 600;
}

.q-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--beige);
    border-top-color: var(--gold-dark);
    border-radius: 50%;
    animation: q-spin 0.8s linear infinite;
}

@keyframes q-spin {
    to {
        transform: rotate(360deg);
    }
}

.q-head {
    margin-bottom: 28px;
}

.q-card h2 {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.q-card .sub {
    color: var(--taupe);
    line-height: 1.8;
    max-width: 52ch;
}

.q-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 20px;
}

.q-grid .full {
    grid-column: 1 / -1;
}

.q-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--charcoal-2);
}

.q-field label span {
    color: var(--gold-dark);
}

.q-field input,
.q-field select,
.q-field textarea {
    width: 100%;
    border: 1px solid var(--beige);
    background: #fff;
    padding: 13px 14px;
    font-size: 16px;
    color: var(--charcoal-3);
    outline: none;
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
}

.q-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238C6E48' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 36px;
}

.q-field textarea {
    min-height: 96px;
    resize: vertical;
}

.q-field input:focus,
.q-field select:focus,
.q-field textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(184, 148, 106, 0.12);
}

.q-error {
    color: #b42318;
    font-size: 12px;
    margin-top: 6px;
}

.q-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 14px;
    margin-bottom: 22px;
    font-size: 14px;
    border-radius: 10px;
}

.q-empty {
    color: var(--taupe);
    grid-column: 1 / -1;
    padding: 18px 0;
}

.q-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.q-choice {
    position: relative;
    border: 1px solid var(--beige);
    background: #fff;
    padding: 22px 20px 20px;
    cursor: pointer;
    text-align: right;
    color: inherit;
    min-height: 118px;
    transition: 0.25s ease;
    border-radius: 14px;
}

.q-choice:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(31, 27, 23, 0.06);
}

.q-choice.selected {
    border-color: var(--gold);
    background: rgba(201, 168, 118, 0.1);
    box-shadow: 0 10px 28px rgba(184, 148, 106, 0.14);
}

.q-choice-check {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--beige-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
}

.q-choice.selected .q-choice-check {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: #fff;
}

.q-choice strong {
    display: block;
    font-size: 22px;
    font-family: var(--font-serif);
    color: var(--charcoal);
    margin-bottom: 8px;
    padding-left: 28px;
}

.q-choice small {
    color: var(--taupe);
    line-height: 1.7;
    font-size: 13px;
}

.q-questions,
.q-service-block {
    margin-top: 28px;
}

.q-section-title {
    margin-bottom: 18px;
}

.q-section-title h3,
.q-service-block h3 {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 500;
    color: var(--charcoal);
}

.q-section-title p {
    color: var(--taupe);
    font-size: 14px;
    margin-top: 4px;
}

.q-q {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--cream-2);
}

.q-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.q-chip {
    position: relative;
    cursor: pointer;
}

.q-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.q-chip span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 16px;
    border: 1px solid var(--beige);
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    color: var(--charcoal-3);
    transition: 0.2s ease;
}

.q-chip input:checked + span {
    border-color: var(--gold-dark);
    background: rgba(201, 168, 118, 0.14);
    color: var(--charcoal);
    font-weight: 600;
}

.q-amount-box {
    margin-top: 28px;
    padding: 22px;
    background: var(--cream);
    border: 1px solid var(--beige);
    border-radius: 14px;
}

.q-amount {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--beige);
    border-radius: 10px;
    overflow: hidden;
}

.q-amount input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.q-amount input:focus {
    box-shadow: none;
}

.q-amount span {
    padding: 0 16px;
    color: var(--gold-dark);
    font-weight: 700;
    border-right: 1px solid var(--beige);
    white-space: nowrap;
}

.q-service-block {
    padding: 22px;
    border: 1px solid var(--beige);
    background: var(--cream);
    border-radius: 14px;
}

.q-review {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.q-review-box {
    border: 1px solid var(--beige);
    padding: 18px 20px;
    border-radius: 14px;
    background: #fff;
}

.q-review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.q-review-box h3 {
    font-size: 13px;
    color: var(--gold-dark);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.q-edit {
    background: none;
    border: 0;
    color: var(--gold-dark);
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}

.q-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cream-2);
    font-size: 14px;
}

.q-line:last-child {
    border-bottom: 0;
}

.q-line span {
    color: var(--taupe);
    flex: 1 1 42%;
}

.q-line strong {
    color: var(--charcoal);
    text-align: left;
    flex: 1 1 50%;
    word-break: break-word;
}

.q-line-nested {
    padding-right: 12px;
}

.q-line-total {
    margin-top: 6px;
    border-top: 1px solid var(--beige);
    font-size: 15px;
}

.q-final {
    margin-top: 28px;
    padding-top: 8px;
    border-top: 1px dashed var(--beige);
}

.q-final .q-head {
    margin-bottom: 18px;
}

.q-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
}

.q-btn {
    border: 0;
    cursor: pointer;
    font-weight: 600;
    padding: 13px 24px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    transition: 0.2s ease;
}

.q-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.q-btn-ghost {
    background: transparent;
    color: var(--charcoal-3);
    border: 1px solid var(--beige-2);
}

.q-btn-gold {
    background: var(--charcoal);
    color: var(--cream);
    min-width: 160px;
}

.q-btn-gold:hover:not(:disabled) {
    background: var(--gold-dark);
}

.q-success {
    text-align: center;
    padding: 48px 12px 28px;
}

.q-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(184, 148, 106, 0.4);
    color: var(--gold-dark);
    font-size: 26px;
    background: rgba(201, 168, 118, 0.1);
}

.q-success h2 {
    font-family: var(--font-serif);
    font-size: clamp(32px, 5vw, 44px);
    margin-bottom: 12px;
}

.q-success p {
    color: var(--taupe);
    line-height: 1.9;
    max-width: 40ch;
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .q-page {
        grid-template-columns: 320px 1fr;
    }

    .q-aside-inner,
    .q-main {
        padding-left: 28px;
        padding-right: 28px;
    }
}

@media (max-width: 992px) {
    .q-page {
        grid-template-columns: 1fr;
    }

    .q-aside {
        min-height: auto;
    }

    .q-aside-media {
        min-height: 100%;
    }

    .q-aside-inner {
        padding: 22px 20px 18px;
    }

    .q-aside-top {
        margin-bottom: 18px;
    }

    .q-lang-dropdown {
        min-width: 148px;
    }

    .q-lang-toggle {
        font-size: 12px;
        padding: 7px 10px;
    }

    .q-aside h1 {
        font-size: 32px;
    }

    .q-aside p.lead {
        margin-bottom: 18px;
        font-size: 14px;
        max-width: none;
    }

    .q-steps {
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
    }

    .q-steps::-webkit-scrollbar {
        display: none;
    }

    .q-steps::before {
        display: none;
    }

    .q-step {
        flex: 0 0 auto;
        padding: 8px 10px;
        border: 1px solid rgba(201, 168, 118, 0.28);
        border-radius: 999px;
        background: rgba(31, 27, 23, 0.28);
        gap: 8px;
    }

    .q-step.active,
    .q-step.done {
        background: rgba(201, 168, 118, 0.18);
        border-color: var(--gold-light);
    }

    .q-step-num {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .q-step-meta small {
        display: none;
    }

    .q-step-meta strong {
        font-size: 13px;
        white-space: nowrap;
    }

    .q-aside-foot {
        display: none;
    }

    .q-main {
        padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
    }

    .q-card {
        padding: 24px 18px 18px;
    }

    .q-grid,
    .q-choices {
        grid-template-columns: 1fr;
    }

    .q-choice {
        min-height: 0;
    }

    .q-actions {
        position: sticky;
        bottom: 0;
        z-index: 6;
        margin: 24px -18px -18px;
        padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
        background: rgba(255, 252, 248, 0.96);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--beige);
    }

    .q-btn {
        /* flex: 1; */
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .q-brand-mark {
        font-size: 22px;
    }

    .q-aside-inner {
        padding: 18px 16px 14px;
    }

    .q-aside h1 {
        font-size: 28px;
    }

    .q-aside p.lead {
        display: none;
    }

    .q-step-meta strong {
        display: none;
    }

    .q-step.active .q-step-meta strong {
        display: block;
    }

    .q-line {
        flex-direction: column;
        gap: 4px;
    }

    .q-line strong {
        text-align: right;
    }

    .q-amount {
        flex-direction: column;
        align-items: stretch;
    }

    .q-amount span {
        border-right: 0;
        border-top: 1px solid var(--beige);
        text-align: center;
        padding: 8px;
    }
}

@media (min-width: 993px) {
    .q-aside {
        position: sticky;
        top: 0;
        height: 100vh;
        height: 100dvh;
    }
}

html[dir="ltr"] .q-step {
    text-align: left;
}

html[dir="ltr"] .q-steps::before {
    right: auto;
    left: 17px;
}

html[dir="ltr"] .q-choice {
    text-align: left;
}

html[dir="ltr"] .q-choice-check {
    left: auto;
    right: 14px;
}

html[dir="ltr"] .q-choice strong {
    padding-left: 0;
    padding-right: 28px;
}

html[dir="ltr"] .q-field select {
    background-position: right 14px center;
    padding-left: 14px;
    padding-right: 36px;
}

html[dir="ltr"] .q-line strong {
    text-align: right;
}

html[dir="ltr"] .q-line-nested {
    padding-right: 0;
    padding-left: 12px;
}

html[dir="ltr"] .q-amount span {
    border-right: 0;
    border-left: 1px solid var(--beige);
}

html[dir="ltr"] .q-lang-dropdown {
    align-items: flex-start;
}

.q-lang-dropdown--main {
    display: none;
    margin: 0 0 18px;
    max-width: 220px;
}

.q-lang-dropdown--light {
    align-items: flex-start;
}

.q-lang-dropdown--light .q-lang-label {
    color: #8a7d70;
}

.q-lang-dropdown--light .q-lang-toggle {
    background: #fff;
    color: #2b241c;
    border-color: #e4d8c8;
}

.q-lang-dropdown--light .q-lang-chevron {
    color: #8a6a3d;
}

.q-lang-dropdown--light .q-lang-flag {
    box-shadow: 0 0 0 1px rgba(43, 36, 28, 0.12);
}

.q-lang-dropdown--light .q-lang-menu {
    background: #fff;
    border-color: #e4d8c8;
    box-shadow: 0 16px 40px rgba(43, 36, 28, 0.12);
}

.q-lang-dropdown--light .q-lang-option {
    color: #2b241c;
}

.q-lang-dropdown--light .q-lang-option:hover,
.q-lang-dropdown--light .q-lang-option.is-active {
    background: #f4eee6;
}

@media (max-width: 992px) {
    .q-lang-dropdown--main {
        display: flex;
    }
}

@media (max-width: 560px) {
    html[dir="ltr"] .q-line strong {
        text-align: left;
    }
}
