/* InteriorX Auto BD V2.0 — centered desktop categories, premium flash timer,
   AJAX cart drawer and secure checkout phone verification. */

/* Center the category rail on wide screens without affecting mobile swipe. */
@media (min-width: 801px) {
    .round-categories .scroll-row {
        justify-content: center;
        flex-wrap: wrap;
        row-gap: 14px;
        overflow: visible;
        padding-inline: 8px;
    }
}

/* Flash deal premium title bar */
.flash-deal-head {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(150px, 1fr);
    align-items: center;
    gap: 24px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border: 1px solid rgba(227, 6, 19, .14);
    border-radius: 16px;
    background:
        radial-gradient(circle at 15% 0%, rgba(255, 224, 89, .45), transparent 34%),
        linear-gradient(100deg, #ffac12 0%, #ff6b3d 50%, #ed164c 100%);
    box-shadow: 0 14px 35px rgba(232, 51, 47, .16);
    color: #fff;
}

.flash-deal-heading .section-kicker {
    color: rgba(255, 255, 255, .86);
    margin-bottom: 2px;
}

.flash-deal-heading h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 2.1vw, 34px);
    line-height: 1.15;
}

.flash-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: ui-sans-serif, system-ui, sans-serif;
}

.flash-countdown > div {
    min-width: 60px;
    padding: 8px 10px 7px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    color: #27272a;
    text-align: center;
    box-shadow: 0 7px 18px rgba(82, 19, 24, .12);
}

.flash-countdown b {
    display: block;
    font-size: 21px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.flash-countdown small {
    display: block;
    margin-top: 4px;
    color: #71717a;
    font-size: 9px;
    font-weight: 700;
}

.flash-countdown > span {
    font-size: 22px;
    font-weight: 900;
}

.flash-countdown.expired {
    min-width: 250px;
    padding: 12px 20px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: #be123c;
    font-weight: 800;
}

.flash-see-all {
    justify-self: end;
    padding: 10px 17px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    transition: .2s;
}

.flash-see-all:hover {
    background: #fff;
    color: #e30613;
}

/* Cart drawer */
.cart-drawer-shell {
    position: fixed;
    inset: 0;
    z-index: 220;
    visibility: hidden;
    pointer-events: none;
}

.cart-drawer-shell.open {
    visibility: visible;
    pointer-events: auto;
}

.cart-drawer-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(11, 15, 24, .58);
    opacity: 0;
    backdrop-filter: blur(2px);
    transition: opacity .25s ease;
}

.cart-drawer-shell.open .cart-drawer-overlay {
    opacity: 1;
}

.cart-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: min(440px, 100%);
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: #fff;
    box-shadow: -25px 0 70px rgba(0, 0, 0, .24);
    transform: translateX(105%);
    transition: transform .3s cubic-bezier(.2,.8,.2,1);
}

.cart-drawer-shell.open .cart-drawer {
    transform: translateX(0);
}

.cart-drawer > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid #e7e9ee;
}

.cart-drawer > header span {
    color: #e30613;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
}

.cart-drawer > header h2 {
    margin: 2px 0 0;
    font-size: 25px;
}

.cart-drawer > header button {
    width: 42px;
    height: 42px;
    border: 1px solid #e2e5ea;
    border-radius: 50%;
    background: #fff;
    color: #222;
    font-size: 26px;
    line-height: 1;
}

.cart-drawer-items {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 20px 20px;
}

.cart-drawer-loading,
.cart-drawer-empty {
    min-height: 280px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #6b7280;
}

.cart-drawer-empty > div {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.cart-drawer-empty span {
    font-size: 56px;
}

.cart-drawer-item {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: start;
    padding: 15px 0;
    border-bottom: 1px solid #eef0f3;
}

.cart-drawer-image {
    width: 82px;
    height: 82px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f6f7f8;
}

.cart-drawer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-drawer-image span {
    font-size: 30px;
}

.cart-drawer-item h3 {
    margin: 0 0 5px;
    font-size: 14px;
    line-height: 1.42;
}

.cart-drawer-item small {
    display: block;
    color: #777;
    font-size: 11px;
}

.cart-drawer-item strong {
    display: block;
    margin-top: 7px;
    color: #e30613;
    font-size: 15px;
}

.cart-drawer-remove {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #fff1f2;
    color: #be123c;
    font-size: 18px;
}

.cart-drawer-qty {
    display: inline-grid;
    grid-template-columns: 31px 38px 31px;
    align-items: center;
    margin-top: 10px;
    border: 1px solid #dde1e7;
    border-radius: 8px;
    overflow: hidden;
}

.cart-drawer-qty button {
    height: 31px;
    border: 0;
    background: #f7f8fa;
    color: #222;
    font-size: 17px;
}

.cart-drawer-qty span {
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.cart-drawer > footer {
    padding: 18px 22px calc(20px + env(safe-area-inset-bottom));
    border-top: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 -12px 30px rgba(15, 23, 42, .06);
}

.cart-drawer-subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
}

.cart-drawer-subtotal b {
    font-size: 23px;
}

.cart-drawer > footer p {
    margin: 6px 0 14px;
    color: #777;
    font-size: 11px;
}

.cart-drawer > footer .btn {
    width: 100%;
    margin-top: 8px;
    min-height: 47px;
}

body.cart-drawer-open {
    overflow: hidden;
}

/* OTP checkout gate */
.otp-checkout-page {
    position: relative;
    min-height: min(780px, calc(100vh - 130px));
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 48px 16px;
    background:
        radial-gradient(circle at 10% 20%, rgba(227,6,19,.08), transparent 28%),
        radial-gradient(circle at 90% 80%, rgba(18,168,77,.08), transparent 25%),
        #f5f6f8;
}

.otp-backdrop-art {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    border: 90px solid rgba(227,6,19,.025);
    transform: translate(55%, -35%);
}

.otp-card {
    position: relative;
    z-index: 2;
    width: min(510px, 100%);
    padding: 35px;
    border: 1px solid rgba(218, 222, 230, .9);
    border-radius: 24px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 28px 80px rgba(18, 25, 38, .14);
    text-align: center;
}

.otp-brand {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.otp-brand img {
    max-width: 190px;
    max-height: 65px;
    object-fit: contain;
}

.otp-brand b {
    font: 900 27px/1 Arial, sans-serif;
    font-style: italic;
}

.otp-brand b span { color: #e30613; }
.otp-brand small { margin-left: 10px; font: 700 9px Arial; letter-spacing: 3px; }

.otp-icon {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    margin: 12px auto;
    border-radius: 22px;
    background: linear-gradient(145deg, #fff1f2, #ffe1e4);
    font-size: 35px;
}

.otp-step {
    color: #e30613;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
}

.otp-card h1 {
    margin: 8px 0;
    font-size: 28px;
}

.otp-card > p {
    max-width: 400px;
    margin: 0 auto 22px;
    color: #626b78;
    font-size: 14px;
}

.otp-form {
    display: grid;
    gap: 14px;
    text-align: left;
}

.otp-form label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 750;
}

.otp-form input {
    width: 100%;
    min-height: 52px;
    padding: 12px 15px;
    border: 1px solid #cfd5df;
    border-radius: 11px;
    background: #fbfcfd;
    outline: 0;
}

.otp-form input:focus {
    border-color: #e30613;
    box-shadow: 0 0 0 4px rgba(227,6,19,.09);
    background: #fff;
}

.otp-form input[name="otp"] {
    text-align: center;
    font: 800 25px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .45em;
    padding-left: calc(15px + .45em);
}

.otp-form .btn {
    min-height: 52px;
    width: 100%;
}

.phone-input-wrap {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: center;
    border: 1px solid #cfd5df;
    border-radius: 11px;
    overflow: hidden;
    background: #fbfcfd;
}

.phone-input-wrap:focus-within {
    border-color: #e30613;
    box-shadow: 0 0 0 4px rgba(227,6,19,.09);
    background: #fff;
}

.phone-input-wrap > span {
    padding: 0 13px;
    border-right: 1px solid #e0e4ea;
    color: #4b5563;
    font-weight: 700;
}

.phone-input-wrap input {
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.otp-phone-chip {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #dfe4ea;
    border-radius: 11px;
    background: #f8fafc;
    text-align: left;
}

.otp-phone-chip span { color: #777; font-size: 11px; }
.otp-phone-chip b { font-size: 15px; }
.otp-phone-chip form { margin: 0; }
.otp-phone-chip button,
.otp-resend-form button {
    border: 0;
    background: transparent;
    color: #e30613;
    font-weight: 800;
}

.otp-resend-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.otp-resend-form button:disabled { color: #9ca3af; cursor: not-allowed; }
.otp-resend-form small { color: #777; }

.otp-security-note {
    margin-top: 20px;
    padding: 10px;
    border-radius: 9px;
    background: #eefaf3;
    color: #087b3a;
    font-size: 12px;
}

.otp-back-link {
    display: inline-block;
    margin-top: 17px;
    color: #555;
    font-size: 13px;
    font-weight: 700;
}

.checkout-verified-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    color: #087b3a;
    font-size: 12px;
}

@media (max-width: 800px) {
    .round-categories .scroll-row {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .flash-deal-head {
        grid-template-columns: 1fr auto;
        gap: 10px;
        padding: 12px;
        border-radius: 14px;
    }

    .flash-deal-heading h2 { font-size: 23px; }
    .flash-countdown {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-top: 2px;
        scrollbar-width: none;
    }
    .flash-countdown::-webkit-scrollbar { display: none; }
    .flash-countdown > div { min-width: 54px; padding: 7px 8px 6px; }
    .flash-countdown b { font-size: 18px; }
    .flash-see-all { grid-column: 2; grid-row: 1; padding: 8px 11px; font-size: 11px; }

    .cart-drawer { width: min(390px, 100%); }
    .cart-drawer > header { padding: 16px; }
    .cart-drawer-items { padding-inline: 14px; }
    .cart-drawer > footer { padding-inline: 16px; }

    .otp-checkout-page {
        min-height: calc(100vh - 105px);
        padding: 20px 10px calc(90px + env(safe-area-inset-bottom));
    }
    .otp-card { padding: 25px 18px; border-radius: 18px; }
    .otp-card h1 { font-size: 24px; }
    .otp-icon { width: 60px; height: 60px; font-size: 30px; }
}

@media (max-width: 430px) {
    .flash-deal-head { grid-template-columns: minmax(0,1fr) auto; }
    .flash-countdown { gap: 4px; }
    .flash-countdown > div { min-width: 48px; padding-inline: 5px; }
    .flash-countdown > span { font-size: 16px; }

    .cart-drawer-item { grid-template-columns: 68px minmax(0,1fr) 30px; gap: 10px; }
    .cart-drawer-image { width: 68px; height: 68px; }
    .cart-drawer-item h3 { font-size: 13px; }

    .otp-card { padding-inline: 14px; }
    .otp-phone-chip { grid-template-columns: 1fr auto; }
    .otp-phone-chip span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cart-drawer,
    .cart-drawer-overlay { transition: none; }
}

.link-button{padding:0;border:0;background:transparent;color:#e30613;font-weight:800;text-decoration:underline;text-underline-offset:2px}
