
:root {
    --pink: #F3EDF8;
    --blue: #B8D4FF;
    --lavender: #D4C4FF;
    --sage: #8FA89B;
    --dark: #30263A;
    --white: #FFFCFD;
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    background: var(--pink);
    color: var(--dark);
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.font-display {
    font-family: 'Fredoka', sans-serif;
}

.brutal-border {
    border: 3px solid var(--dark);
}

.brutal-btn {
    border: 3px solid var(--dark);
    box-shadow: 4px 4px 0 var(--dark);
    transition: all .15s ease;
}

.brutal-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--dark);
}

.brutal-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--dark);
}

.choice {
    border: 2px solid var(--dark);
    transition: .2s ease;
}

.choice.active {
    background: var(--blue);
    box-shadow: 2px 2px 0 var(--dark);
    transform: translate(-1px, -1px);
}

.choice:not(.active):hover {
    background: #F1E9F3;
}

.extra.active {
    background: var(--lavender);
    box-shadow: 2px 2px 0 var(--dark);
}

.liquid-wave {
    transition: fill .6s ease, opacity .5s ease;
}

@keyframes pourStream {
    0% { stroke-dashoffset: 1000; opacity: 0; }
    25% { opacity: 1; }
    80% { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}

.pour-animation {
    stroke-dasharray: 1000;
    animation: pourStream 1.1s ease forwards;
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-5px) rotate(4deg); }
}

.floating-ice {
    animation: floatSlow 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0); }
    50% { transform: scale(1.12) rotate(10deg); }
}

.sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

input, select, textarea {
    font-family: inherit;
}

/* HEADER */

.title-banner {
    flex: 0 0 112px;
    height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: transparent !important;
    border-bottom: none !important;
}

.main-title {
    line-height: 1.1;
}

/* MAIN LAYOUT */

.builder-main {
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 18px 18px;
}

.builder-grid {
    height: 100%;
    min-height: 0;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(220px, 3fr) minmax(300px, 6fr) minmax(250px, 3fr);
    gap: 18px;
    align-items: stretch;
}

/* SIDE PANELS */

.flavor-panel,
.extras-panel {
    min-height: 0;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--sage) transparent;
    overscroll-behavior: contain;
}

.flavor-panel::-webkit-scrollbar,
.extras-panel::-webkit-scrollbar {
    width: 6px;
}

.flavor-panel::-webkit-scrollbar-thumb,
.extras-panel::-webkit-scrollbar-thumb {
    background: var(--sage);
    border-radius: 10px;
}

.flavor-panel::-webkit-scrollbar-track,
.extras-panel::-webkit-scrollbar-track {
    background: transparent;
}

.flavor-panel h2,
.extras-panel h2 {
    font-size: 17px;
}

.flavor-panel .choice {
    padding: 10px;
    min-height: 64px;
}

/* CUP */

.cup-stage {
    min-height: 0 !important;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cup-wrap {
    width: min(100%, 290px);
    height: min(100%, 390px);
}

.cup-stage .mt-2 {
    margin-top: 0;
}

.cup-stage .mt-4 {
    margin-top: 8px;
}

/* EXTRAS */

.extras-panel #syrupSection h3,
.extras-panel > div > h3 {
    font-size: 12px;
    margin-bottom: 6px;
}

/* SYRUPS */

#syrupOptions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    min-width: 0;
}

#syrupOptions .choice {
    padding: 5px 3px;
    min-height: 48px;
    border-width: 1.5px;
    border-radius: 8px;
}

#syrupOptions .choice span:first-child {
    font-size: 14px;
}

#syrupOptions .choice span:last-child {
    font-size: 9px;
}

/* TOPPINGS */

#toppingList,
#littleExtrasList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    min-width: 0;
}

#toppingList .extra,
#littleExtrasList .extra {
    min-width: 0;
    min-height: 38px;
    padding: 5px 6px;
    gap: 5px;
    border-width: 1.5px;
    border-radius: 8px;
    box-shadow: none;
}

#toppingList .extra > span:first-child,
#littleExtrasList .extra > span:first-child {
    width: 23px;
    height: 23px;
    min-width: 23px;
    font-size: 13px;
    border-width: 1px;
    border-radius: 6px;
}

#toppingList .extra > span:nth-child(2),
#littleExtrasList .extra > span:nth-child(2) {
    min-width: 0;
    font-size: 9px;
    line-height: 1.2;
}

#toppingList .extra > span:nth-child(2) span:last-child,
#littleExtrasList .extra > span:nth-child(2) span:last-child {
    display: none;
}

#toppingList .extra > span:nth-child(3),
#littleExtrasList .extra > span:nth-child(3) {
    font-size: 8px;
}

#toppingList .extra > span:last-child,
#littleExtrasList .extra > span:last-child {
    width: 12px;
    height: 12px;
    min-width: 12px;
    border-width: 1.5px;
    font-size: 7px;
}

/* CELEBRATION */

#celebration {
    padding: 9px;
    margin-top: 0;
    flex-shrink: 0;
}

#celebration .font-display {
    font-size: 15px;
}

#celebrationToggle {
    margin-top: 7px;
    padding: 7px 9px;
    font-size: 11px;
}

#celebrationOptions {
    margin-top: 8px;
}

#celebrationOptions .choice {
    padding: 6px;
    font-size: 10px;
}

#celebrationOptions p {
    font-size: 9px;
}

.extras-panel > .bg-\[\#B8D4FF\] {
    padding: 8px;
}

/* CELEBRATION MESSAGE */

#celebrationMessage {
    display: block;
    width: 100%;
    min-height: 38px;
    height: 38px;
    margin-top: 7px;
    padding: 8px 10px;
    background: var(--white);
    border: 1.5px solid var(--dark);
    border-radius: 9px;
    color: var(--dark);
    font-size: 10px;
    font-weight: 700;
    resize: none;
    outline: none;
    transition: all .2s ease;
}

#celebrationMessage::placeholder {
    color: var(--dark);
    opacity: .45;
}

#celebrationMessage:focus {
    background: var(--pink);
    box-shadow: 2px 2px 0 var(--dark);
}

/* ORDER FOOTER */

.order-footer {
    flex: 0 0 auto;
    min-height: 76px;
    padding: 10px 22px;
}

.order-footer .max-w-7xl {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.footer-total {
    justify-self: start;
    min-width: 0;
}

.footer-checkout {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-actions {
    grid-column: 3;
    justify-self: end;
    min-width: 0;
}

.order-footer button {
    padding-top: 9px;
    padding-bottom: 9px;
}

.order-footer #totalPrice {
    font-size: 27px;
}

#footerCheckout {
    min-width: 155px;
    white-space: nowrap;
    font-size: 15px;
    background: #D4C4FF;
}

#footerCheckout:hover {
    background: #C6B2F5;
}

#footerCheckout.hidden {
    display: none;
}

/* CART */

#cartModal .cart-content {
    max-height: 90vh;
    overflow-y: auto;
}

.cart-delete-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 2px solid var(--dark);
    border-radius: 50%;
    background: #F2C9DC;
    color: var(--dark);
    font-size: 14px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    position: relative;
    z-index: 5;
}

.cart-delete-btn:hover {
    background: var(--lavender);
    transform: scale(1.08);
}

#cartItems {
    min-width: 0;
}

/* CLOUD FOAM */

#foamTopping,
#foamSprinkles {
    pointer-events: none;
}

#foamBase {
    transition: fill .35s ease;
}

#foamSprinkles {
    transition: opacity .2s ease;
}

/* SHORT DESKTOP SCREENS */

@media (max-height: 800px) and (min-width: 1024px) {
    .title-banner {
        flex-basis: 94px;
        height: 94px;
    }

    .title-banner p {
        margin-top: 3px;
    }

    .builder-main {
        padding-top: 10px;
        padding-bottom: 12px;
    }

    .builder-grid {
        gap: 13px;
    }

    .flavor-panel,
    .extras-panel {
        padding: 11px;
        gap: 8px;
    }

    .flavor-panel .choice {
        min-height: 56px;
        padding: 7px;
    }

    .cup-wrap {
        height: min(100%, 350px);
    }

    .cup-stage .mt-4 {
        margin-top: 4px;
    }

    #toppingList,
    #littleExtrasList {
        gap: 5px;
    }

    #toppingList .extra,
    #littleExtrasList .extra {
        min-height: 34px;
        padding: 4px 5px;
    }

    #celebration {
        padding: 7px;
    }

    #celebrationMessage {
        height: 38px;
        min-height: 38px;
        padding: 8px 10px;
        margin-top: 7px;
    }

    .order-footer {
        min-height: 68px;
        padding: 7px 18px;
    }
}

/* SMALL LAPTOP SCREENS */

@media (max-height: 700px) and (min-width: 1024px) {
    .title-banner {
        flex-basis: 82px;
        height: 82px;
    }

    .builder-main {
        padding-top: 7px;
        padding-bottom: 8px;
    }

    .builder-grid {
        gap: 10px;
    }

    .cup-wrap {
        height: min(100%, 300px);
    }

    .order-footer {
        min-height: 62px;
        padding: 6px 16px;
    }
}

/* TABLET */

@media (max-width: 1023px) {
    html, body {
        height: auto;
        min-height: 100%;
    }

    body {
        overflow: auto;
    }

    .title-banner {
        height: auto;
        min-height: 110px;
        flex-basis: auto;
        padding: 20px 12px;
    }

    .builder-main {
        flex: none;
        padding: 18px;
    }

    .builder-grid {
        height: auto;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .flavor-panel,
    .extras-panel {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .cup-stage {
        min-height: 430px !important;
        height: auto;
        order: 2;
    }

    .flavor-panel {
        order: 1;
    }

    .extras-panel {
        order: 3;
    }

    .cup-wrap {
        width: 290px;
        height: 390px;
    }

    .order-footer {
        position: sticky;
        bottom: 0;
    }

    .order-footer .max-w-7xl {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .footer-total {
        justify-content: center;
    }

    .footer-checkout {
        width: 100%;
        order: 2;
    }

    .footer-actions {
        width: 100%;
        justify-content: center;
        order: 3;
    }

    #footerCheckout {
        width: 100%;
        max-width: 320px;
    }

    #toppingList .extra,
    #littleExtrasList .extra {
        min-height: 38px;
    }
}

/* MOBILE EXPERIENCE */

@media (max-width: 600px) {
    html, body {
        width: 100%;
        height: auto;
        min-height: 100%;
    }

    body {
        overflow-x: hidden;
        overflow-y: auto;
        background:
            radial-gradient(circle at 10% 12%, rgba(212,196,255,.35), transparent 25%),
            radial-gradient(circle at 90% 35%, rgba(184,212,255,.35), transparent 24%),
            var(--pink);
    }

    /* HEADER */

    .title-banner {
        min-height: 0;
        height: auto;
        flex: 0 0 auto;
        padding: 22px 14px 20px;
        border-bottom: none;
        background: transparent;
    }

    .main-title {
        font-size: 1.85rem;
        line-height: 1.1;
        letter-spacing: .02em;
    }

    .title-banner p {
        font-size: 10px;
        margin-top: 9px;
        line-height: 1.5;
    }

    /* PAGE LAYOUT */

    .builder-main {
        width: 100%;
        padding: 15px 13px 25px;
    }

    .builder-grid {
        display: flex;
        flex-direction: column;
        gap: 19px;
    }

    /* PANELS */

    .flavor-panel,
    .extras-panel {
        width: 100%;
        height: auto;
        max-height: none;
        overflow: visible;
        padding: 16px;
        gap: 13px;
        border-width: 2px;
        border-radius: 23px;
        box-shadow: 4px 4px 0 var(--dark);
        background: rgba(255,255,255,.94);
    }

    .flavor-panel h2,
    .extras-panel h2 {
        font-size: 17px;
    }

    .flavor-panel > div:first-child,
    .extras-panel > div:first-child {
        padding-bottom: 11px;
    }

    /* FLAVORS */

    .flavor-panel {
        order: 1;
    }

    #flavorGrid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .flavor-panel .choice {
        position: relative;
        min-height: 65px;
        padding: 8px 9px;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        text-align: left;
        gap: 8px;
        border: 2px solid var(--dark);
        border-radius: 13px;
        background: #FFFDFE;
        box-shadow: 2px 2px 0 rgba(48,38,58,.16);
    }

    .flavor-panel .choice.active {
        background: var(--blue);
        box-shadow: 3px 3px 0 var(--dark);
        transform: translate(-2px, -2px);
    }

    .flavor-panel .choice > span:first-child {
        font-size: 23px;
        line-height: 1.2;
        flex-shrink: 0;
    }

    .flavor-panel .choice > span:nth-child(2) {
        display: block;
        flex: 1;
        width: auto;
        min-width: 0;
        text-align: left;
    }

    .flavor-panel .choice > span:nth-child(2) span:first-child {
        font-size: 10px;
        line-height: 1.3;
    }

    .flavor-panel .choice > span:nth-child(2) span:last-child {
        font-size: 8px;
        margin-top: 3px;
    }

    .flavor-panel .choice > span:last-child {
        font-size: 9px;
        font-weight: 900;
    }

    /* TOPPINGS */

    .customize-section {
        margin-top: 5px;
    }

    .customize-section h3 {
        font-size: 15px;
    }

    #toppingList {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #toppingList .extra {
        min-width: 0;
        min-height: 46px;
        height: auto;
        padding: 7px 8px;
        gap: 7px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        border: 1.5px solid var(--dark);
        border-radius: 12px;
        background: #FFFDFE;
        box-shadow: 1px 2px 0 rgba(48,38,58,.10);
    }

    #toppingList .extra.active {
        background: #F1E7FF;
        box-shadow: 2px 2px 0 var(--dark);
    }

    #toppingList .extra > span:first-child {
        width: 27px;
        height: 27px;
        min-width: 27px;
        font-size: 15px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    #toppingList .extra > span:nth-child(2) {
        min-width: 0;
        flex: 1;
        font-size: 9px;
        line-height: 1.3;
        text-align: left;
    }

    #toppingList .extra > span:nth-child(3) {
        font-size: 8px;
        white-space: nowrap;
    }

    #toppingList .extra > span:last-child {
        width: 13px;
        height: 13px;
        min-width: 13px;
        font-size: 8px;
        flex-shrink: 0;
    }

    /* INFO BOX */

    .flavor-panel > .bg-\[\#F7F1F4\] {
        padding: 12px;
        border-radius: 14px;
    }

    /* CUP AREA */

    .cup-stage {
        order: 2;
        position: relative;
        width: 100%;
        min-height: 450px !important;
        height: 500px;
        padding: 20px 10px;
        overflow: hidden;
        border: 2px solid var(--dark);
        border-radius: 28px;
        background:
            radial-gradient(ellipse at center, rgba(255,255,255,.96) 0%, rgba(255,255,255,.65) 55%, rgba(212,196,255,.35) 100%);
        box-shadow: 4px 4px 0 var(--dark);
        gap: 12px;
        justify-content: center;
        align-items: center;
    }

    .cup-stage::before {
        content: "✦";
        position: absolute;
        top: 35px;
        left: 27px;
        font-size: 31px;
        color: #B59BD9;
        animation: sparkle 3s infinite;
    }

    .cup-stage::after {
        content: "✧";
        position: absolute;
        right: 28px;
        top: 95px;
        font-size: 35px;
        color: #8FA89B;
        animation: sparkle 2.5s infinite;
    }

    .cup-wrap {
        position: relative;
        z-index: 2;
        width: min(76vw, 285px);
        height: 350px;
        flex: none;
    }

    .cup-stage .bg-white {
        position: relative;
        z-index: 3;
        padding: 9px 16px;
        border-radius: 30px;
        box-shadow: 2px 3px 0 var(--dark);
        font-size: 11px;
    }

    .cup-stage .sparkle {
        font-size: 18px;
    }

    /* EXTRAS */

    #syrupOptions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    #syrupOptions .choice {
        min-height: 60px;
        padding: 6px 4px;
        border: 1.5px solid var(--dark);
        border-radius: 10px;
        background: #FFFDFE;
    }

    #syrupOptions .choice.active {
        background: var(--blue);
        box-shadow: 2px 2px 0 var(--dark);
    }

    #syrupOptions .choice span:first-child {
        font-size: 19px;
    }

    #syrupOptions .choice span:last-child {
        font-size: 9px;
    }

    /* LITTLE EXTRAS */

    #littleExtrasList {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #littleExtrasList .extra {
        min-width: 0;
        min-height: 46px;
        height: auto;
        padding: 7px 8px;
        gap: 7px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        border: 1.5px solid var(--dark);
        border-radius: 12px;
        background: #FFFDFE;
        box-shadow: 1px 2px 0 rgba(48,38,58,.10);
    }

    #littleExtrasList .extra.active {
        background: #F1E7FF;
        box-shadow: 2px 2px 0 var(--dark);
    }

    #littleExtrasList .extra > span:first-child {
        width: 27px;
        height: 27px;
        min-width: 27px;
        font-size: 15px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    #littleExtrasList .extra > span:nth-child(2) {
        min-width: 0;
        flex: 1;
        font-size: 9px;
        line-height: 1.3;
        text-align: left;
    }

    #littleExtrasList .extra > span:nth-child(3) {
        font-size: 8px;
        white-space: nowrap;
    }

    #littleExtrasList .extra > span:last-child {
        width: 13px;
        height: 13px;
        min-width: 13px;
        font-size: 8px;
        flex-shrink: 0;
    }

    /* CELEBRATION */

    #celebration {
        padding: 14px;
        border-width: 2px;
        border-radius: 17px;
        background: linear-gradient(135deg, #F3EAFE, #E9F1FF);
        box-shadow: 2px 3px 0 rgba(48,38,58,.15);
    }

    #celebration .font-display {
        font-size: 17px;
    }

    #celebration .text-\[10px\] {
        font-size: 10px;
        line-height: 1.5;
    }

    #celebrationToggle {
        min-height: 45px;
        margin-top: 12px;
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 12px;
        background: white;
    }

    #celebrationOptions {
        padding-top: 8px;
    }

    #celebrationOptions p {
        font-size: 10px;
        line-height: 1.6;
    }

    #celebrationMessage {
        height: 65px;
        min-height: 65px;
        padding: 12px;
        font-size: 12px;
        border-radius: 12px;
    }

    /* BOTTOM INFO */

    .extras-panel > .bg-\[\#B8D4FF\] {
        padding: 12px;
        border-radius: 13px;
    }

    .extras-panel > .bg-\[\#B8D4FF\] p {
        font-size: 10px;
    }

    /* MOBILE FOOTER */

    .order-footer {
        position: sticky;
        bottom: 0;
        z-index: 40;
        width: 100%;
        min-height: 0;
        padding: 9px 11px calc(9px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,.97);
        border-top: 2px solid var(--dark);
        box-shadow: 0 -4px 16px rgba(48,38,58,.12);
        backdrop-filter: blur(12px);
    }

    .order-footer .max-w-7xl {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        gap: 8px 10px;
    }

    .footer-total {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .footer-total > div:first-child span:first-child {
        font-size: 8px;
    }

    .order-footer #totalPrice {
        font-size: 20px;
        line-height: 1.2;
    }

    .footer-total .h-9 {
        display: none;
    }

    .footer-checkout {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        order: initial;
    }

    #footerCheckout {
        width: 100%;
        max-width: none;
        min-height: 42px;
        padding: 9px 15px;
        font-size: 13px;
        border-width: 2px;
        border-radius: 12px;
        box-shadow: 3px 3px 0 var(--dark);
    }

    .footer-actions {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        justify-self: end;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 5px;
        order: initial;
    }

    .footer-actions button {
        min-height: 37px;
        padding: 7px 9px;
        font-size: 10px;
        border-width: 1.5px;
        border-radius: 10px;
        box-shadow: 2px 2px 0 var(--dark);
        white-space: nowrap;
    }

    .footer-actions button:last-child {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* CART */

    #cartModal {
        padding: 12px;
    }

    #cartModal .cart-content {
        max-height: 85dvh;
        padding: 17px;
        border-width: 2px;
        border-radius: 22px;
        overflow-y: auto;
    }

    #cartModal .cart-content h2 {
        font-size: 21px;
    }

    #cartItems {
        max-height: 40vh;
        overflow-y: auto;
    }

    .cart-delete-btn {
        width: 30px;
        height: 30px;
    }

    /* GIFT NOTE */

    #giftNoteEnvelope {
        right: 3%;
        top: 58%;
        width: 43px;
        height: 43px;
        font-size: 23px;
        border-radius: 12px;
    }

    /* TOUCH FEEDBACK */

    .choice,
    .extra,
    .order-footer button,
    #celebrationToggle {
        -webkit-tap-highlight-color: transparent;
    }

    .choice:active,
    .extra:active {
        transform: scale(.97);
    }

    button {
        touch-action: manipulation;
    }
}

/* EXTRA SMALL PHONES */

@media (max-width: 380px) {
    .main-title {
        font-size: 1.65rem;
    }

    .builder-main {
        padding-left: 10px;
        padding-right: 10px;
    }

    .flavor-panel,
    .extras-panel {
        padding: 12px;
    }

    .cup-stage {
        min-height: 410px !important;
        height: 410px;
    }

    .cup-wrap {
        width: 245px;
        height: 320px;
    }

    .footer-actions {
        gap: 4px;
    }

    .footer-actions button {
        padding: 6px 7px;
        font-size: 9px;
    }

    #footerCheckout {
        min-height: 39px;
    }
}

/* REDUCE MOTION */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* LANGUAGE SWITCH */

.language-switch {
    position: absolute;
    top: 14px;
    right: 20px;
    z-index: 10;
}

#languageToggle {
    min-width: 43px;
    height: 35px;
    padding: 5px 10px;
    border: 2px solid var(--dark);
    border-radius: 10px;
    background: var(--white);
    color: var(--dark);
    font-family: 'Fredoka', sans-serif;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 2px 2px 0 var(--dark);
    cursor: pointer;
    transition: all .15s ease;
}

#languageToggle:hover {
    background: var(--lavender);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--dark);
}

#languageToggle:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--dark);
}

/* ARABIC RTL */

html[dir="rtl"] body {
    direction: rtl;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

html[dir="rtl"] .title-banner {
    direction: rtl;
}

html[dir="rtl"] .language-switch {
    right: auto;
    left: 20px;
}

html[dir="rtl"] .flavor-panel,
html[dir="rtl"] .extras-panel {
    text-align: right;
}

html[dir="rtl"] .flavor-panel h2,
html[dir="rtl"] .extras-panel h2,
html[dir="rtl"] .customize-section h3 {
    direction: rtl;
}

html[dir="rtl"] .flavor-panel .choice,
html[dir="rtl"] #syrupOptions .choice,
html[dir="rtl"] #toppingList .extra,
html[dir="rtl"] #littleExtrasList .extra {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] #celebration {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] #celebrationToggle {
    direction: rtl;
}

html[dir="rtl"] #celebrationMessage {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .order-footer {
    direction: rtl;
}

html[dir="rtl"] .order-footer .max-w-7xl {
    direction: rtl;
}

html[dir="rtl"] .footer-total {
    direction: rtl;
}

html[dir="rtl"] .footer-actions {
    direction: rtl;
}

html[dir="rtl"] #cartModal .cart-content {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] #cartItems {
    direction: rtl;
}

html[dir="rtl"] #toast {
    right: auto;
    left: 20px;
    direction: rtl;
}

html[dir="rtl"] #toast.translate-x-\[150\%\] {
    transform: translateX(-150%);
}

/* KEEP DRINK ILLUSTRATION LTR */

html[dir="rtl"] .cup-stage,
html[dir="rtl"] #drinkSvg,
html[dir="rtl"] #pitcherContainer {
    direction: ltr;
}

/* ARABIC MOBILE */

@media (max-width: 600px) {
    .language-switch {
        top: 12px;
        right: 12px;
    }

    html[dir="rtl"] .language-switch {
        right: auto;
        left: 12px;
    }

    html[dir="rtl"] .footer-actions {
        justify-content: flex-start;
    }

    html[dir="rtl"] .footer-total {
        justify-self: start;
    }

    html[dir="rtl"] .cup-stage {
        direction: ltr;
    }
}
