/* ===== KAHRAMANA BAGHDAD — CART DRAWER SYSTEM v3.4 =====
 *
 * Changes from v3.3:
 * [Feature]   .kh-float-cart: floating cart toggle button — fixed, z-index 1001,
 *             morphs cart ↔ X icon, directional positioning per [dir].
 * [Feature]   .kh-float-badge: animated pop badge above float button.
 * [Feature]   .kh-toast--success / --error / --info: branded three-variant toast system.
 * [UX]        .kh-gps-btn--loading / --done: GPS button state variants.
 * [UX]        .kh-req: gold asterisk for required field labels.
 * [UX]        .kh-cart-subtitle: item count label in header.
 * [A11y]      .kh-error-msg.show added to prefers-reduced-motion block (was missing).
 * [CSS]       box-shadow directional per [dir] (RTL: +10px, LTR: -10px).
 * [CSS]       .kh-cart-close touch target increased to 0.6rem padding (WCAG 2.5.5).
 * ======================================================== */

/* ─────────────────────────────────────────────────────────
   DRAWER — core
───────────────────────────────────────────────────────── */
.kh-cart-drawer {
    position: fixed;
    top: 0;
    width: min(420px, 100vw);
    height: 100vh;
    height: 100dvh;
    color: var(--col-parchment, #dfc9aa);
    z-index: 9991;
    display: flex;
    flex-direction: column;
    font-family: var(--font-primary, 'Cairo', sans-serif);
    background: rgba(101, 45, 19, 0.94);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);
    border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
    border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html[dir="ltr"] .kh-cart-drawer {
    inset-inline-end: 0;
    transform: translateX(100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), -12px 0 60px rgba(0, 0, 0, .35);
}

html[dir="rtl"] .kh-cart-drawer {
    inset-inline-start: 0;
    transform: translateX(100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), -12px 0 60px rgba(0, 0, 0, .35);
}

.kh-cart-drawer.open {
    transform: translateX(0) !important;
}

/* ─────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────── */
.kh-cart-header {
    padding: 1.1rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(209, 159, 81, 0.12);
    flex-shrink: 0;
}

.kh-cart-header-inner {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.kh-cart-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--col-gold, #d19f51);
    letter-spacing: 0.03em;
}

.kh-cart-subtitle {
    font-size: 0.72rem;
    color: rgba(223, 201, 170, 0.55);
    font-weight: 500;
    min-height: 1em;
}

.kh-cart-close {
    cursor: pointer;
    color: var(--col-parchment, #dfc9aa);
    opacity: 0.55;
    transition: opacity 0.2s, color 0.2s;
    background: none;
    border: none;
    padding: 0.6rem;
    /* ≥44px touch target */
    line-height: 0;
    border-radius: 50%;
    flex-shrink: 0;
}

.kh-cart-close:hover {
    opacity: 1;
    color: var(--col-gold, #d19f51);
}

.kh-cart-close:focus-visible {
    opacity: 1;
    color: var(--col-gold, #d19f51);
    outline: 2px solid var(--col-gold, #d19f51);
    outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────
   FOCUS TRAP SENTINELS
───────────────────────────────────────────────────────── */
.kh-focus-trap {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ─────────────────────────────────────────────────────────
   SR-ONLY UTILITY
───────────────────────────────────────────────────────── */
.kh-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ─────────────────────────────────────────────────────────
   BODY & SCROLL
───────────────────────────────────────────────────────── */
.kh-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.4rem;
    scroll-behavior: smooth;
}

.kh-cart-body::-webkit-scrollbar {
    width: 4px;
}

.kh-cart-body::-webkit-scrollbar-track {
    background: transparent;
}

.kh-cart-body::-webkit-scrollbar-thumb {
    background: rgba(209, 159, 81, .25);
    border-radius: 2px;
}

/* ─────────────────────────────────────────────────────────
   CART ITEMS
───────────────────────────────────────────────────────── */
.kh-cart-item {
    display: flex;
    gap: 0.9rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: flex-start;
    animation: khItemIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--index, 0) * 55ms);
}

@keyframes khItemIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kh-cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 0.6rem;
    object-fit: cover;
    background: var(--col-ember, #8b4524);
    flex-shrink: 0;
}

.kh-cart-item-info {
    flex: 1;
    min-width: 0;
}

.kh-cart-item-name {
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kh-cart-item-price {
    font-size: 0.78rem;
    color: var(--col-gold, #d19f51);
    font-weight: 600;
}

.kh-cart-item-ctrl {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.4rem;
}

.kh-cart-btn {
    position: relative;
    overflow: hidden;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid rgba(209, 159, 81, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    font-size: 0.85rem;
    background: none;
    color: var(--col-parchment, #dfc9aa);
}

.kh-cart-btn:hover {
    background: var(--col-gold, #d19f51);
    color: var(--col-void, #652d13);
    border-color: var(--col-gold, #d19f51);
}

.kh-cart-btn:focus-visible {
    background: var(--col-gold, #d19f51);
    color: var(--col-void, #652d13);
    outline: 2px solid var(--col-gold, #d19f51);
    outline-offset: 2px;
}

.kh-cart-btn:active {
    transform: scale(0.88);
}

/* Ripple */
.kh-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
    transform: scale(0);
    animation: khRipple 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes khRipple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

.kh-cart-qty {
    font-variant-numeric: tabular-nums;
    min-width: 1.4em;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ─────────────────────────────────────────────────────────
   ITEM NOTE INPUT
───────────────────────────────────────────────────────── */
.kh-cart-item-note-row {
    margin-top: 0.5rem;
}

.kh-cart-item-note {
    width: 100%;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(209, 159, 81, .1);
    border-radius: 0.4rem;
    padding: 0.32rem 0.6rem;
    font-size: 0.74rem;
    color: var(--col-parchment, #dfc9aa);
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
    box-sizing: border-box;
}

.kh-cart-item-note:focus:not(:focus-visible) {
    outline: none;
    background: rgba(255, 255, 255, .05);
    border-color: rgba(209, 159, 81, .3);
}

.kh-cart-item-note:focus-visible {
    outline: 2px solid var(--col-gold, #d19f51);
    outline-offset: 2px;
    background: rgba(255, 255, 255, .05);
    border-color: rgba(209, 159, 81, .3);
}

.kh-cart-item-note::placeholder {
    color: rgba(223, 201, 170, .3);
    font-style: italic;
}

/* ─────────────────────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────────────────────── */
.kh-cart-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}

.kh-cart-empty-icon {
    width: 80px;
    opacity: 0.8;
}

.kh-cart-empty-icon svg {
    width: 100%;
    height: auto;
}

.kh-cart-empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--col-gold, #d19f51);
}

.kh-cart-empty-subtitle {
    font-size: 0.8rem;
    opacity: 0.5;
    margin: 0;
}

/* ─────────────────────────────────────────────────────────
   CUSTOMER FORM
───────────────────────────────────────────────────────── */
.kh-cart-form {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(209, 159, 81, .12);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.kh-field {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.kh-field label,
.kh-radio-legend {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: var(--col-gold, #d19f51);
    text-transform: uppercase;
}

.kh-req {
    color: #e88c5a;
}

.kh-field input,
.kh-field select,
.kh-field textarea {
    padding: 0.62rem 0.85rem;
    background: rgba(90, 39, 16, .7);
    border: 1px solid rgba(209, 159, 81, .15);
    border-radius: 0.55rem;
    color: var(--col-parchment, #dfc9aa);
    font-family: inherit;
    font-size: 0.84rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.kh-field input:focus:not(:focus-visible),
.kh-field select:focus:not(:focus-visible),
.kh-field textarea:focus:not(:focus-visible) {
    outline: none;
    border-color: var(--col-gold, #d19f51);
    box-shadow: 0 0 0 2px rgba(209, 159, 81, .18);
}

.kh-field input:focus-visible,
.kh-field select:focus-visible,
.kh-field textarea:focus-visible {
    outline: 2px solid var(--col-gold, #d19f51);
    outline-offset: 2px;
    border-color: var(--col-gold, #d19f51);
    box-shadow: 0 0 0 2px rgba(209, 159, 81, .18);
}

.kh-field input[aria-invalid="true"],
.kh-field select[aria-invalid="true"],
.kh-field textarea[aria-invalid="true"] {
    border-color: #e05c4a;
    box-shadow: 0 0 0 2px rgba(224, 92, 74, .18);
}

.kh-field textarea {
    resize: vertical;
    min-height: 58px;
}

.kh-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23d19f51' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    padding-inline-end: 2rem;
}

html[dir="rtl"] .kh-field select {
    background-position: 12px center;
    padding-inline-start: 2rem;
    padding-inline-end: 0.85rem;
}

.kh-field select option {
    background: #5a2710;
    color: var(--col-parchment, #dfc9aa);
}

/* ─────────────────────────────────────────────────────────
   ERROR MESSAGES
───────────────────────────────────────────────────────── */
.kh-error-msg {
    font-size: 0.7rem;
    color: #e05c4a;
    margin-top: 0.1rem;
    display: none;
    align-items: center;
    gap: 0.3rem;
}

.kh-error-msg.show {
    display: flex;
    animation: khSlideDown 0.2s ease-out;
}

@keyframes khSlideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─────────────────────────────────────────────────────────
   ADDRESS ROW + GPS BUTTON
───────────────────────────────────────────────────────── */
.kh-addr-row {
    display: flex;
    gap: 0.45rem;
    align-items: stretch;
}

.kh-addr-row input {
    flex: 1;
}

.kh-gps-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.7rem;
    background: rgba(209, 159, 81, .08);
    border: 1.5px solid rgba(209, 159, 81, .22);
    border-radius: 0.55rem;
    color: var(--col-gold, #d19f51);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    font-family: inherit;
    line-height: 1;
    flex-shrink: 0;
}

.kh-gps-btn:hover:not(:disabled) {
    background: rgba(209, 159, 81, .18);
    border-color: var(--col-gold, #d19f51);
}

.kh-gps-btn:focus-visible:not(:disabled) {
    outline: 2px solid var(--col-gold, #d19f51);
    outline-offset: 2px;
    background: rgba(209, 159, 81, .18);
    border-color: var(--col-gold, #d19f51);
}

.kh-gps-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.kh-gps-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kh-gps-btn--loading {
    color: rgba(223, 201, 170, .6);
    border-color: rgba(209, 159, 81, .15);
}

.kh-gps-btn--done {
    color: #4caf72;
    border-color: rgba(76, 175, 114, .4);
    background: rgba(76, 175, 114, .08);
}

/* ─────────────────────────────────────────────────────────
   RADIO GROUP
───────────────────────────────────────────────────────── */
.kh-radio-group {
    display: flex;
    gap: 0.45rem;
}

.kh-radio-opt {
    flex: 1;
}

.kh-radio-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.kh-radio-opt label {
    display: block;
    text-align: center;
    padding: 0.52rem 0.4rem;
    background: rgba(90, 39, 16, .7);
    border: 1.5px solid rgba(209, 159, 81, .15);
    border-radius: 0.55rem;
    cursor: pointer;
    font-size: 0.77rem;
    font-weight: 600;
    color: rgba(223, 201, 170, .55);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    text-transform: none;
    letter-spacing: normal;
}

.kh-radio-opt input[type="radio"]:checked+label {
    border-color: var(--col-gold, #d19f51);
    color: var(--col-gold, #d19f51);
    background: rgba(209, 159, 81, .1);
}

.kh-radio-opt input[type="radio"]:focus-visible+label {
    outline: 2px solid var(--col-gold, #d19f51);
    outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────
   FOOTER / CHECKOUT
───────────────────────────────────────────────────────── */
.kh-cart-footer {
    padding: 1.1rem 1.4rem;
    background: rgba(60, 24, 8, .8);
    border-top: 1px solid rgba(209, 159, 81, .1);
    flex-shrink: 0;
}

.kh-cart-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.9rem;
}

.kh-cart-checkout {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 0.88rem;
    background: #25D366;
    color: #fff;
    border-radius: 0.7rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    border: none;
    font-family: inherit;
    line-height: 1;
}

/* Directional fill on hover */
.kh-cart-checkout::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    transform: translate(-50%, -50%);
    inset-inline-start: var(--hx, 50%);
    top: var(--hy, 50%);
    transition: width 0.55s ease, height 0.55s ease, opacity 0.55s ease;
    opacity: 0;
}

.kh-cart-checkout:hover:not(:disabled)::before {
    width: 300%;
    height: 300%;
    opacity: 1;
}

.kh-cart-checkout:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, .35);
}

.kh-cart-checkout:focus-visible:not(:disabled) {
    outline: 2px solid #25D366;
    outline-offset: 3px;
}

.kh-cart-checkout:active:not(:disabled) {
    transform: scale(0.984) translateY(0);
}

.kh-cart-checkout:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #3a3a3a;
}

/* ─────────────────────────────────────────────────────────
   OVERLAY
───────────────────────────────────────────────────────── */
.kh-cart-overlay {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    bottom: 0;
    inset-inline-start: 0;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9990;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.kh-cart-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ─────────────────────────────────────────────────────────
   FLOATING CART BUTTON
   z-index 1001 — always above overlay (999) and drawer (1000)
   so it remains accessible as a close button when drawer is open.
───────────────────────────────────────────────────────── */
.kh-float-cart {
    position: fixed;
    bottom: 1.75rem;
    z-index: 9992;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, #d19f51 0%, #b07830 100%);
    color: #3a1a06;
    box-shadow:
        0 4px 16px rgba(209, 159, 81, .45),
        0 8px 32px rgba(0, 0, 0, .3),
        inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s,
        background 0.3s;
    font-family: inherit;
}

html[dir="ltr"] .kh-float-cart {
    inset-inline-end: 1.75rem;
}

html[dir="rtl"] .kh-float-cart {
    inset-inline-start: 1.75rem;
}

.kh-float-cart:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow:
        0 6px 24px rgba(209, 159, 81, .6),
        0 12px 40px rgba(0, 0, 0, .35),
        inset 0 1px 0 rgba(255, 255, 255, .25);
}

.kh-float-cart:focus-visible {
    outline: 3px solid var(--col-gold, #d19f51);
    outline-offset: 3px;
}

.kh-float-cart:active {
    transform: scale(0.94);
}

@media (max-width: 900px) {
    .kh-float-cart {
        bottom: 95px;
    }
}

/* Icon morphing — cart ↔ close */
.kh-float-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kh-float-icon--cart {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.kh-float-icon--close {
    opacity: 0;
    transform: scale(0.4) rotate(-90deg);
}

.kh-float-cart--open .kh-float-icon--cart {
    opacity: 0;
    transform: scale(0.4) rotate(90deg);
}

.kh-float-cart--open .kh-float-icon--close {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.kh-float-cart--open {
    background: linear-gradient(140deg, #652d13 0%, #4a1f0a 100%);
    box-shadow:
        0 4px 16px rgba(101, 45, 19, .5),
        0 8px 32px rgba(0, 0, 0, .4),
        inset 0 1px 0 rgba(255, 255, 255, .1);
    color: var(--col-parchment, #dfc9aa);
}

/* ─────────────────────────────────────────────────────────
   FLOAT BADGE
───────────────────────────────────────────────────────── */
.kh-float-badge {
    position: absolute;
    top: -3px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 10px;
    background: #e05c4a;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(101, 45, 19, .9);
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

html[dir="ltr"] .kh-float-badge {
    inset-inline-end: -3px;
}

html[dir="rtl"] .kh-float-badge {
    inset-inline-start: -3px;
}

.kh-float-badge.visible {
    opacity: 1;
    transform: scale(1);
}

.kh-float-badge.pop {
    animation: khBadgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes khBadgePop {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.55);
    }

    100% {
        transform: scale(1);
    }
}

/* External page badges (.kh-cart-badge) */
.kh-cart-badge {
    position: absolute;
    top: -5px;
    background: var(--col-gold, #d19f51);
    color: var(--col-void, #652d13);
    font-size: 0.68rem;
    font-weight: 900;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[dir="rtl"] .kh-cart-badge {
    inset-inline-start: -5px;
}

html[dir="ltr"] .kh-cart-badge {
    inset-inline-end: -5px;
}

.kh-cart-badge.pop {
    animation: khBadgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─────────────────────────────────────────────────────────
   TOAST NOTIFICATIONS — three branded variants
───────────────────────────────────────────────────────── */
.kh-toast-container {
    position: fixed;
    bottom: calc(1.75rem + 58px + 1rem);
    /* above float button */
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.6rem;
    pointer-events: none;
    max-width: min(360px, calc(100vw - 3rem));
}

html[dir="rtl"] .kh-toast-container {
    inset-inline-start: 1.75rem;
}

html[dir="ltr"] .kh-toast-container {
    inset-inline-end: 1.75rem;
}

.kh-toast {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 0.83rem;
    border: 1px solid transparent;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .2);
    transform: translateY(12px) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.35s ease;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.kh-toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.kh-toast.hide {
    transform: translateY(8px) scale(0.96);
    opacity: 0;
}

/* ── Success variant (gold / amber) ── */
.kh-toast--success {
    background: rgba(48, 22, 7, 0.95);
    border-color: rgba(209, 159, 81, .25);
    color: var(--col-parchment, #dfc9aa);
}

.kh-toast--success .kh-toast-icon {
    color: var(--col-gold, #d19f51);
}

/* ── Error variant (dark red) ── */
.kh-toast--error {
    background: rgba(40, 10, 10, 0.96);
    border-color: rgba(224, 92, 74, .3);
    color: #f2c4bb;
}

.kh-toast--error .kh-toast-icon {
    color: #e05c4a;
}

/* ── Info variant (muted parchment) ── */
.kh-toast--info {
    background: rgba(30, 18, 10, 0.95);
    border-color: rgba(209, 159, 81, .15);
    color: rgba(223, 201, 170, .8);
}

.kh-toast--info .kh-toast-icon {
    color: rgba(209, 159, 81, .7);
}

.kh-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}

.kh-toast-body {
    flex: 1;
    font-size: 0.82rem;
    line-height: 1.4;
}

.kh-toast-action {
    opacity: 0.7;
    font-size: 0.77rem;
}

.kh-toast-name {
    font-weight: 700;
}

/* ─────────────────────────────────────────────────────────
   SPINNER
───────────────────────────────────────────────────────── */
.kh-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    border-top-color: #fff;
    animation: khSpin 0.9s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes khSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ─────────────────────────────────────────────────────────
   REDUCED MOTION — WCAG 2.3.3
───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    .kh-cart-drawer,
    .kh-cart-overlay,
    .kh-toast,
    .kh-float-cart,
    .kh-float-badge,
    .kh-cart-badge,
    .kh-cart-checkout,
    .kh-cart-btn,
    .kh-gps-btn,
    .kh-cart-close,
    .kh-radio-opt label,
    .kh-cart-item-note,
    .kh-float-icon,
    .kh-field input,
    .kh-field select,
    .kh-field textarea {
        transition: none !important;
        animation: none !important;
    }

    .kh-cart-item {
        animation: none !important;
    }

    .kh-error-msg.show {
        animation: none !important;
    }

    .kh-spinner {
        animation: none !important;
        border-top-color: #fff;
        opacity: 0.8;
    }

    /* Badges still need to be visible — just no animation */
    .kh-float-badge.visible {
        opacity: 1;
        transform: scale(1);
    }

    .kh-float-badge.pop {
        animation: none !important;
    }
}

/* ─────────────────────────────────────────────────────────
   RESPONSIVE — <380px
───────────────────────────────────────────────────────── */
@media (max-width: 380px) {
    .kh-cart-header {
        padding: 0.9rem 1rem;
    }

    .kh-cart-body {
        padding: 0.8rem 1rem;
    }

    .kh-cart-footer {
        padding: 0.9rem 1rem;
    }

    .kh-float-cart {
        width: 52px;
        height: 52px;
        bottom: 1.25rem;
    }

    html[dir="ltr"] .kh-float-cart {
        inset-inline-end: 1.25rem;
    }

    html[dir="rtl"] .kh-float-cart {
        inset-inline-start: 1.25rem;
    }

    .kh-toast-container {
        bottom: calc(1.25rem + 52px + 0.8rem);
        max-width: calc(100vw - 2.5rem);
    }

    html[dir="rtl"] .kh-toast-container {
        inset-inline-start: 1.25rem;
    }

    html[dir="ltr"] .kh-toast-container {
        inset-inline-end: 1.25rem;
    }

    .kh-radio-opt label {
        font-size: 0.7rem;
        padding: 0.45rem 0.3rem;
    }
}