/* --- Global Styles --- */
:root {
    /* Dynamic viewport variables */
    --app-height: 100vh;
    --safe-area-bottom: env(safe-area-inset-bottom, 20px);

    /* Color variables */
    --gold: #ffd700;
    --pink: #ff69b4;
    --purple: #a259f7;
    --teal: #1de9b6;
    --white: #fff;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
    --radius: 18px;
}

/* Base */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--pink), var(--gold), var(--teal), var(--purple));
    min-height: 100vh;
    font-family: 'Quicksand', Arial, sans-serif;
    color: #333;
    overflow-x: hidden;
}

/* --- Party Cart --- */
.party-cart-container {
    position: fixed;
    top: 28px;
    right: 32px;
    z-index: 3000;
    display: flex;
    align-items: flex-start;
    gap: 0.6em;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 699px) {
    .party-cart-container {
        top: 50%;
        right: 0;
        align-items: center;
        justify-content: flex-end;
        margin: 0;
        padding: 0 10px 0 0;
        pointer-events: none;
        transform: translateY(-50%);
        z-index: 4000;
    }
    .party-cart {
        pointer-events: auto;
    }
}

.party-cart {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    pointer-events: auto;
    transition: box-shadow 0.16s, transform 0.16s;
    animation: cartPulse 2.2s infinite;
}
.party-cart:active {
    transform: scale(0.94);
    animation: none;
}

.cart-icon {
    width: 56px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    filter: drop-shadow(0 2px 6px #ffd70099);
}

.cart-count {
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--purple);
    color: var(--white);
    font-size: 1.08rem;
    font-weight: bold;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 8px #ffd70066;
    border: 2px solid #fff;
    text-align: center;
    transition: transform 0.18s;
    z-index: 5;
    pointer-events: none;
    padding: 0;
}

.cart-bounce {
    animation: cartBounce 0.7s cubic-bezier(.33,1.62,.52,1.01);
}

.cart-bubble {
    background: #fffbe6;
    color: var(--purple);
    font-size: 1.08rem;
    font-weight: bold;
    border-radius: 18px 18px 18px 6px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.6), 0 2px 12px rgba(255, 105, 180, 0.6);
    padding: 0.8em 1.3em;
    margin-left: 0.4em;
    margin-top: 0.22em;
    position: fixed; /* Changed to fixed for better positioning */
    top: 80px; /* Position below the cart icon */
    right: 20px;
    min-width: 180px;
    max-width: 260px;
    pointer-events: auto;
    display: none; /* Start hidden, will be shown via JS */
    align-items: center;
    justify-content: center;
    gap: 0.3em;
    animation: bubbleAppear 0.7s cubic-bezier(.33,1.62,.52,1.01), cartPulse 2s infinite;
    z-index: 10000; /* Ensure it's on top of everything */
    opacity: 1;
    text-align: center;
    font-family: 'Press Start 2P', cursive; /* Use the 80s font */
    font-size: 0.9rem;
    line-height: 1.4;
}
.cart-bubble::after {
    content: '';
    position: absolute;
    left: -18px;
    top: 22px;
    width: 18px;
    height: 18px;
    background: #fffbe6;
    border-radius: 50%;
    box-shadow: -2px 2px 8px #ffd70022;
    z-index: 1;
}

@keyframes cartPulse {
    0%, 100% { box-shadow: 0 2px 12px #ffd70044, 0 1px 6px #ff69b455; }
    50% { box-shadow: 0 4px 22px #ffd70099, 0 2px 12px #ff69b488; }
}
@keyframes cartBounce {
    0% { transform: scale(1) translateY(0); }
    40% { transform: scale(1.15) translateY(-14px); }
    60% { transform: scale(0.98) translateY(5px); }
    80% { transform: scale(1.08) translateY(-2px); }
    100% { transform: scale(1) translateY(0); }
}
@keyframes bubbleAppear {
    0% { opacity: 0; transform: scale(0.8) translateY(-10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.bubble-active {
    animation: bubbleAppear 0.7s cubic-bezier(.33,1.62,.52,1.01), cartPulse 2s infinite;
}

/* --- Modal Backdrop --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('https://cdn.shopify.com/s/files/1/0015/0185/5843/files/sprinkle-background.png?v=1749101491') repeat;
    z-index: 2000;
    pointer-events: all;
    transition: opacity 0.3s;
    margin: 0;
}

/* --- Party Modal --- */
.party-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2100;
    min-width: 320px;
    max-width: 94vw;
    min-height: 220px;
    background: transparent;
    border-radius: 18px;
    box-shadow: none;
    padding: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, transform 0.3s;
    opacity: 1;
}

.party-invite-modal {
    padding: 0;
    background: none;
    box-shadow: none;
}


.invite-confetti-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: 32px;
    background: #ffb6d5;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}
.invite-confetti-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
            repeating-radial-gradient(circle at 10% 10%, #ffd700 0 2px, transparent 2px 40px),
            repeating-radial-gradient(circle at 40% 30%, #ff69b4 0 2px, transparent 2px 45px),
            repeating-radial-gradient(circle at 70% 70%, #fff 0 2.4px, transparent 2.4px 40px),
            repeating-radial-gradient(circle at 80% 20%, #a259f7 0 2.1px, transparent 2.1px 36px),
            repeating-radial-gradient(circle at 30% 80%, #ffb347 0 2.2px, transparent 2.2px 48px);
    opacity: 0.55;
    z-index: 1;
    border-radius: 32px;
}

.invite-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 2.5rem 0 1.2rem 0;
    z-index: 2;
}
.invite-img {
    max-width: 350px;
    width: 90vw;
    height: auto;
    display: block;
    border-radius: 24px;
    box-shadow: 0 4px 32px #ffd70033, 0 2px 12px #ff69b455;
    background: #fff;
}

.invite-accept-btn {
    margin: 1.5rem 0 2.2rem;
    background: linear-gradient(90deg, var(--gold), var(--pink));
    color: var(--white);
    font-size: 1.19rem;
    font-weight: bold;
    font-family: 'Quicksand', Arial, sans-serif;
    padding: 0.9rem 2.2rem;
    border-radius: 32px;
    box-shadow: 0 2px 12px #ffd70055;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    z-index: 5;
    border: none;
    outline: none;
    animation: invitePulse 1.5s infinite;
}
.invite-accept-btn:hover {
    transform: scale(1.07) rotate(-2deg);
    box-shadow: 0 4px 18px #ffd70099;
    animation: none;
}

@media (max-width: 700px) {
    .party-modal {
        min-width: 96vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        padding: 0;
        margin: 0;
    }
    .invite-envelope-outer { min-height: 120px; width: 98vw; }
    .invite-envelope { width: 94vw; height: 90px; }
    .invite-ticket { width: 86vw; height: 44px; font-size: 0.88rem; }
    .invite-envelope-flap { height: 24px; }
    .invite-envelope-body { height: 54px; }
}

@keyframes modalPopIn {
    0% { opacity: 0; transform: translate(-50%, -42%) scale(0.88); }
    80% { opacity: 1; transform: translate(-50%, -54%) scale(1.06); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* --- Party Header --- */
.party-title {
    font-family: 'Pacifico', cursive;
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 1.2rem;
    text-shadow: 0 2px 12px #fff, 0 2px 4px #ffd70055;
}
.ticket-envelope {
    position: relative;
    width: 180px;
    height: 120px;
    margin: 0 auto 2rem;
    z-index: 2;
}
.envelope {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: #fff;
    border: 2px solid var(--gold);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    z-index: 2;
}
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--gold);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    z-index: 3;
}
.ticket {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%) translateY(40px);
    width: 140px;
    height: 70px;
    background: linear-gradient(135deg, #ffe066 60%, #ffd700 100%);
    border: 2.5px dashed #bfa93c;
    border-radius: 16px;
    box-shadow: 0 2px 12px #ffd70088;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Pacifico', cursive;
    font-size: 1.1rem;
    color: #bfa93c;
    letter-spacing: 0.04em;
    z-index: 4;
    opacity: 0;
    animation: pop-ticket 1.3s 0.5s cubic-bezier(.33,1.62,.52,1.01) forwards;
}

@keyframes pop-ticket {
    0% { opacity: 0; transform: translateX(-50%) translateY(40px) scale(0.8); }
    70% { opacity: 1; transform: translateX(-50%) translateY(-20px) scale(1.05); }
    90% { opacity: 1; transform: translateX(-50%) translateY(-8px) scale(1.02); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.accept-btn {
    margin-top: 2.5rem;
    background: linear-gradient(90deg, var(--gold), var(--pink));
    color: var(--white);
    font-size: 1.2rem;
    font-family: 'Quicksand', Arial, sans-serif;
    font-weight: bold;
    padding: 0.9rem 2.2rem;
    border-radius: 32px;
    box-shadow: 0 2px 12px #ffd70055;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    z-index: 5;
    border: none;
    outline: none;
}
.accept-btn:hover {
    transform: scale(1.07) rotate(-2deg);
    box-shadow: 0 4px 18px #ffd70099;
}

.confetti-canvas {
    position: fixed;
    pointer-events: none;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    display: none;
}

/* --- Shades Section --- */
.shades-section {
    display: none;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 2.5rem 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    animation: fadeIn 1.2s cubic-bezier(.33,1.62,.52,1.01);
}
@keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }

.shades-title {
    font-family: 'Pacifico', cursive;
    font-size: 2rem;
    color: var(--pink);
    margin-bottom: 1.2rem;
    text-shadow: 0 2px 8px #fff, 0 2px 4px #ffd70033;
}
.shades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1.2rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}
.shade-img {
    width: 160px;
    height: 160px;
    max-width: 100%;
    max-height: 180px;
    object-fit: cover;
    object-position: center top;
    margin-bottom: 0.7em;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 2px 12px #ffd70033;
    display: block;
    transition: transform 0.15s;
}
.shade-card:hover img:not(.cart-drawer-item-img):not(.upsell-img) {
    transform: scale(1.07) rotate(-2deg);
    box-shadow: 0 8px 32px #ffd70044;
}

.shade-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem 1rem 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.14s, box-shadow 0.14s;
    /* Add a little less padding for more image space */
    min-height: 260px;
    max-width: 220px;
}
.shade-card:hover {
    transform: translateY(-6px) scale(1.04) rotate(-1deg);
    box-shadow: 0 8px 32px #ffd70044;
    z-index: 2;
}

/* Inventory Status Styles */
.inventory-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 2;
}

.inventory-badge.out-of-stock {
    background-color: rgba(220, 53, 69, 0.85);
    color: white;
}

.inventory-badge.low-stock {
    background-color: rgba(255, 193, 7, 0.85);
    color: #333;
}

/* Out of stock product styling */
.shade-card.out-of-stock {
    opacity: 0.75;
}

.shade-card.out-of-stock .shade-img {
    filter: grayscale(30%);
}

.shade-card.out-of-stock .add-cart-btn {
    background-color: #aaa;
    cursor: not-allowed;
}
.shade-swatch {
    width: 48px;
    height: 48px;
    margin-bottom: 0.7em;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    border: 2.5px solid #eee;
}
.shade-img {
    margin-bottom: 0.7rem;
    box-shadow: 0 2px 8px #fff5, 0 2px 8px #0001;
}
.shade-name {
    font-weight: bold;
    font-size: 1.07rem;
    margin-bottom: 0.32rem;
    color: var(--purple);
    text-align: center;
}
.shade-formula {
    font-size: 0.97rem;
    color: #444;
    margin-bottom: 0.5rem;
    text-align: center;
}
.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(90deg, var(--gold), var(--pink));
    color: var(--white);
    font-size: 0.89rem;
    font-weight: bold;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    box-shadow: 0 1px 6px #ffd70055;
    letter-spacing: 0.02em;
    z-index: 2;
}
.add-cart-btn {
    margin-top: 0.7rem;
    background: linear-gradient(90deg, var(--pink), var(--gold));
    color: var(--white);
    font-size: 1rem;
    font-family: 'Quicksand', Arial, sans-serif;
    font-weight: bold;
    padding: 0.6rem 1.2rem;
    border-radius: 22px;
    box-shadow: 0 2px 8px #ffd70033;
    cursor: pointer;
    transition: transform 0.13s, box-shadow 0.13s;
}
.add-cart-btn:hover {
    transform: scale(1.06) rotate(-2deg);
    box-shadow: 0 4px 16px #ffd70077;
}
.add-cart-btn[disabled], .add-cart-btn:disabled {
    background: #a259f7 !important;
    color: #fff !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
    border: none !important;
}
/* --- Party Header --- */
.party-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.5rem 0 1.5rem;
    gap: 0.5rem;
}
.party-main-title {
    font-family: 'Pacifico', cursive;
    font-size: 2.25rem;
    color: var(--gold);
    text-shadow: 0 2px 12px #fff, 0 2px 4px #ffd70055;
    margin-bottom: 0.1rem;
    letter-spacing: 0.02em;
}
.party-sub-title {
    font-family: 'Quicksand', Arial, sans-serif;
    font-size: 1.25rem;
    color: var(--pink);
    font-weight: bold;
    margin-bottom: 0.7rem;
    text-shadow: 0 1.5px 8px #fff8, 0 1.5px 4px #ffd70022;
    letter-spacing: 0.01em;
}

/* --- Invite Friends Button --- */
.invite-btn {
    margin-top: 0.3rem;
    background: linear-gradient(90deg, var(--gold), var(--pink));
    color: var(--white);
    font-size: 1.13rem;
    font-family: 'Quicksand', Arial, sans-serif;
    font-weight: bold;
    padding: 0.7rem 2.1rem;
    border-radius: 32px;
    box-shadow: 0 2px 12px #ffd70055;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.7em;
    animation: invitePulse 1.5s infinite;
    transition: transform 0.18s, box-shadow 0.18s;
    outline: none;
}

/* --- Bonus Button --- */
.bonus-btn {
    margin-top: 0.3rem;
    background: linear-gradient(90deg, #a259f7, #5f9ea0); /* Explicit purple-blue gradient */
    color: white !important; /* Ensure text is white and legible with !important */
    font-size: 1.13rem;
    font-family: 'Quicksand', Arial, sans-serif;
    font-weight: bold;
    padding: 0.7rem 2.1rem;
    border-radius: 32px;
    box-shadow: 0 2px 12px rgba(162, 89, 247, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7em;
    animation: bonusPulse 1.5s infinite;
    transition: transform 0.18s, box-shadow 0.18s;
    outline: none;
    border: none;
    text-shadow: 0px 1px 2px rgba(0,0,0,0.2); /* Add text shadow for better legibility */
}

/* Ensure text inside bonus button is always white */
.bonus-btn .bonus-text,
.bonus-btn .bonus-icon {
    color: white !important;
}
.invite-btn:hover {
    box-shadow: 0 6px 24px #ffd70099;
    animation: none;
}

.bonus-btn:hover {
    box-shadow: 0 6px 24px rgba(162, 89, 247, 0.6);
    animation: none;
}
.invite-btn-floating:hover, .bonus-btn-floating:hover {
    transform: scale(1.03); /* Reduced scale to prevent layout shifts */
}
.invite-btn-inline:hover, .bonus-btn-inline:hover {
    transform: translateX(-50%) scale(1.03); /* Reduced scale to prevent layout shifts */
}
.invite-icon, .bonus-icon {
    font-size: 1.3em;
    filter: drop-shadow(0 2px 4px #ffd70099);
    margin-right: 0.1em;
    animation: bounceIcon 1.2s infinite;
}
.bonus-icon {
    filter: drop-shadow(0 2px 4px #a259f799);
}
@keyframes invitePulse {
    0% { box-shadow: 0 2px 12px #ffd70055, 0 0 0 0 #ff69b455; }
    60% { box-shadow: 0 2px 12px #ffd70099, 0 0 0 12px #ff69b400; }
    100% { box-shadow: 0 2px 12px #ffd70055, 0 0 0 0 #ff69b400; }
}
@keyframes bonusPulse {
    0% { box-shadow: 0 2px 12px rgba(162, 89, 247, 0.4), 0 0 0 0 rgba(95, 158, 160, 0.3); }
    60% { box-shadow: 0 2px 12px rgba(162, 89, 247, 0.6), 0 0 0 10px rgba(95, 158, 160, 0); } /* Reduced pulse size */
    100% { box-shadow: 0 2px 12px rgba(162, 89, 247, 0.4), 0 0 0 0 rgba(95, 158, 160, 0); }
}
@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
    50% { transform: translateY(0); }
    70% { transform: translateY(4px); }
}

/* --- Invite Modal --- */
.invite-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.29);
    z-index: 2000;
    pointer-events: all;
    transition: opacity 0.3s;
}
.invite-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.99);
    border-radius: 24px;
    box-shadow: 0 8px 48px #ffd70099, 0 1.5px 10px #0002;
    padding: 2.5rem 2.5rem;
    min-width: 320px;
    max-width: 450px;
    width: 90vw;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: modalPopIn 0.7s cubic-bezier(.33,1.62,.52,1.01);
    text-align: center;
    position: relative;
}
.invite-modal-title {
    font-family: 'Press Start 2P', cursive; /* Use the 80s font */      font-size: 1.6rem;
    color: var(--gold);
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 8px #fff, 0 2px 4px #ffd70055;
}
.invite-modal-desc {
    font-family: 'Quicksand', Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 1.2rem 0;
    max-width: 90%;
    color: #333;
}

.invite-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.invite-input-group {
    width: 100%;
    display: flex;
    justify-content: center;
}

.invite-input {
    font-family: 'Quicksand', Arial, sans-serif;
    font-size: 1rem;
    padding: 0.8em 1.2em;
    border-radius: 18px;
    border: 1.5px solid #ffd70099;
    outline: none;
    width: 100%;
    transition: border 0.18s;
}

.invite-input:focus {
    border: 2px solid var(--gold);
}

.invite-disclaimer {
    font-size: 0.85em;
    color: #666;
    margin: 0.5rem 0;
    text-align: center;
    width: 100%;
    line-height: 1.4;
}

.invite-submit-btn {
    background: linear-gradient(90deg, var(--pink), var(--gold));
    color: var(--white);
    font-family: 'Quicksand';
    font-weight: bold;
    padding: 0.8rem 1.5rem;
    border-radius: 22px;
    box-shadow: 0 2px 8px #ffd70033;
    cursor: pointer;
    transition: transform 0.13s, box-shadow 0.13s;
    border: none;
    width: auto;
    margin-top: 0.5rem;
}

.invite-submit-btn:hover {
    transform: scale(1.06) rotate(-2deg);
    box-shadow: 0 4px 16px #ffd70077;
}

.invite-close-x {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #a259f7;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, transform 0.2s;
}
.invite-result {
    font-family: 'Quicksand';
    font-size: 1.07rem;
    color: var(--teal);
    margin: 0.5rem 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Special styling for the modal when showing results */
.invite-modal-result-view {
    padding: 2rem 1.5rem;
    max-width: 450px;
    width: 90vw;
}
.invite-close-x:hover {
    background-color: rgba(162, 89, 247, 0.1);
    transform: scale(1.1);
}

.invite-sms-btn {
    display: block;
    width: 90%;
    max-width: 280px;
    background: linear-gradient(90deg, var(--purple), var(--gold));
    color: var(--white);
    font-family: 'Quicksand';
    font-weight: bold;
    padding: 0.8rem 1.5rem;
    border-radius: 22px;
    box-shadow: 0 2px 8px #ffd70033;
    cursor: pointer;
    transition: transform 0.13s, box-shadow 0.13s;
    border: none;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1rem;
    margin: 0 auto;
}

.invite-sms-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px #ffd70077;
}
.invite-share-row {
    display: flex;
    gap: 0.5em;
    margin-bottom: 0.2em;
    justify-content: center;
    width: 100%;
}
.invite-share-input {
    font-size: 1em;
    padding: 0.6em 0.8em;
    border-radius: 13px;
    border: 1.5px solid #ffd70099;
    outline: none;
    width: 90%;
    max-width: 380px;
    background: #fffbe6;
    color: var(--purple);
    font-weight: bold;
    transition: border 0.18s;
    text-align: center;
    margin: 0 auto 0.8em auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}
.invite-share-input:focus {
    border: 2px solid var(--gold);
    background: #fffde7;
}

.invite-copy-btn {
    background: linear-gradient(90deg, var(--pink), var(--gold));
    color: var(--white);
    font-family: 'Quicksand';
    font-weight: bold;
    padding: 0.8rem 1.5rem;
    border-radius: 22px;
    box-shadow: 0 2px 8px #ffd70033;
    cursor: pointer;
    transition: transform 0.13s, box-shadow 0.13s;
    border: none;
    width: 90%;
    max-width: 280px;
    margin: 0 auto 0.8em auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.invite-copy-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px #ffd70077;
}

.invite-close-btn {
    margin-top: 0.7rem;
    background: linear-gradient(90deg, var(--gold), var(--pink));
    color: var(--white);
    font-size: 1rem;
    font-family: 'Quicksand';
    font-weight: bold;
    padding: 0.5rem 1.2rem;
    border-radius: 22px;
    box-shadow: 0 2px 8px #ffd70033;
    cursor: pointer;
    transition: transform 0.13s, box-shadow 0.13s;
    border: none;
}
.invite-close-btn:hover {
    transform: scale(1.06) rotate(-2deg);
    box-shadow: 0 4px 16px #ffd70077;
}

/* --- Responsive Overrides --- */
@media (max-width: 700px) {
    .shades-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.7rem; }
    .shade-card { padding: 0.8rem 0.5rem 1rem; }
    .shades-section { padding: 1.2rem 0.2rem 0.7rem; }
    .party-main-title { font-size: 1.25rem; }
    .party-sub-title { font-size: 1rem; }
    .invite-modal {
        min-width: 85vw;
        padding: 2rem 1.2rem;
        max-width: 85vw;
        width: 85vw;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        position: fixed;
        max-height: 90vh;
        overflow-y: auto;
        margin: 0;
    }

    .invite-modal-result-view {
        padding: 1.5rem;
        max-width: 85vw;
        width: 85vw;
    }

    .invite-share-input {
        width: 90%;
        max-width: 300px;
        font-size: 0.9rem;
        padding: 0.6em;
        max-width: 100%;
    }

    .invite-input {
        font-size: 0.95rem;
        padding: 0.7em 1em;
    }

    .invite-submit-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
        width: 100%;
    }

    .invite-copy-btn,
    .invite-sms-btn {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
        width: 90%;
        max-width: 280px;
        margin-bottom: 0.6rem;
    }

    .referral-modal {
        padding: 1.8rem 1.5rem;
        width: 85vw;
        max-width: 85vw;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 2001;
    }

    .referral-modal .invite-modal-title {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }

    .referral-modal .invite-modal-desc {
        font-size: 1rem;
        line-height: 1.3;
    }

    .referral-accept-btn,
    .referral-skip-btn {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}

/* --- Upsell Offer --- */
.upsell-offer {
    position: fixed;
    top: 32px;
    left: 0;
    z-index: 4000;
    display: flex;
    align-items: flex-start;
    pointer-events: none;
    transition: transform 0.55s cubic-bezier(.33,1.62,.52,1.01), opacity 0.3s;
    transform: translateX(-110%);
    opacity: 0;
    background: #fff0f6;
    border-radius: 20px;
    box-shadow: 0 4px 32px #ffd70033, 0 2px 12px #ff69b455;
    padding: 15px;
}
.upsell-offer.upsell-show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}
.upsell-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.1em;
    gap: 1.1em;
    width: 320px;
    max-width: 96vw;
    position: relative;
}
@media (min-width: 700px) {
    .upsell-offer { align-items: center; top: 50%; transform: translateY(-50%) translateX(-110%); }
    .upsell-offer.upsell-show { transform: translateY(-50%) translateX(0); }
    .upsell-card { flex-direction: row; justify-content: center; }
    .upsell-img-wrap { width: 120px; height: 120px; }
    .upsell-img { width: 110px; height: 110px; }
    .upsell-info { gap: 0.2em; }
}
.invite-btn-floating, .invite-btn-inline {
    font-size: 1.09rem;
    padding: 0.78em 1.7em;
    border-radius: 16px;
    background: linear-gradient(90deg, var(--gold), var(--pink));
    color: var(--white);
    font-family: 'Quicksand', Arial, sans-serif;
    font-weight: bold;
    box-shadow: 0 2px 10px #ffd70033, 0 1px 8px #ff69b433;
}
.invite-btn-floating {
    position: fixed;
    top: 32px;
    left: 32px;
    z-index: 3200;
    display: none;
}

.bonus-btn-floating {
    position: fixed;
    top: 110px; /* Increased spacing below the invite button */
    left: 32px; /* Same left alignment as invite button */
    z-index: 3200;
    display: none;
    /* Ensure no problematic transforms on the base state */
    transform: none;
}
.invite-btn-inline {
    display: none;
    margin: 2em auto 1.5em;
    width: fit-content;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    /* Ensure the button stays centered regardless of parent container changes */
    z-index: 5;
}

.bonus-btn-inline {
    display: none;
    margin: 2em auto 1.5em;
    width: fit-content;
    position: relative;
    z-index: 5;
}

/* Mobile layout container for buttons */
.mobile-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* Increased gap for better spacing */
    flex-wrap: wrap;
    margin: 2em auto 1.5em;
    width: 100%;
    max-width: 95vw; /* Prevent overflow on small screens */
}

/* Reset positioning for buttons inside container */
.mobile-buttons-container .invite-btn-inline,
.mobile-buttons-container .bonus-btn-inline {
    position: static;
    transform: none;
    margin: 0;
    left: auto;
}
@media (min-width: 700px) {
    .invite-btn-floating { display: block; }
    .bonus-btn-floating { display: none; } /* Initially hidden until threshold reached */
}
@media (max-width: 699px) {
    .invite-btn-inline { display: inline-flex; }
    .bonus-btn-inline { display: none; } /* Initially hidden until threshold reached */
}

.upsell-img-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    box-shadow: 0 2px 12px #ffd70044;
}
.upsell-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px #ffd70044, 0 1px 4px #ff69b433;
    background: #fff;
}
.upsell-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--gold) 70%, var(--pink));
    color: var(--white);
    font-size: 0.92em;
    font-weight: bold;
    padding: 0.32em 0.9em;
    border-radius: 13px;
    box-shadow: 0 1px 8px #ffd70033;
    letter-spacing: 0.03em;
}
.upsell-info {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    justify-content: center;
    min-width: 120px;
}
.upsell-title {
    font-family: 'Pacifico', 'Quicksand', cursive;
    color: #d12c7a;
    font-size: 1.16em;
    font-weight: bold;
    margin-bottom: 0.1em;
    padding-top:30px;
}
.upsell-desc {
    color: var(--purple);
    font-size: 0.97em;
    margin-bottom: 0.4em;
}
.upsell-add-btn {
    background: linear-gradient(90deg, var(--gold) 60%, var(--pink) 100%);
    color: var(--white);
    font-family: 'Quicksand', Arial, sans-serif;
    font-weight: bold;
    font-size: 1em;
    padding: 0.58em 1.5em;
    border-radius: 14px;
    box-shadow: 0 2px 8px #ffd70044;
    cursor: pointer;
    transition: background 0.18s, transform 0.13s;
    border: none;
    margin-top: 0.1em;
}
.upsell-add-btn:active { transform: scale(0.96); }
.upsell-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--purple);
    font-size: 1.25em;
    cursor: pointer;
    z-index: 2;
    padding: 0.12em 0.4em;
    border-radius: 50%;
    transition: background 0.16s;
}
.upsell-close:hover { background: #ffd7e988; }
/* Hide upsell photos by default (desktop) */
.upsell-photos {
    display: none;
}

@media (max-width: 700px) {
    .upsell-offer {
        top: 0;
        right: 0;
        left: auto; /* Override the left:0 from desktop */
        width: 100vw;
        height: auto; /* Auto height instead of full viewport */
        max-height: calc(100vh - 80px); /* Maximum height */
        margin-top: 80px; /* Space for the progress bar */
        background-color: #fff0f6;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 0;
        transform: translateX(100%); /* Start from right side */
        box-shadow: -5px 0 20px rgba(0,0,0,0.2);
        overflow-y: auto;
    }
    .upsell-offer.upsell-show {
        transform: translateX(0); /* Slide in from right */
    }
    .upsell-card {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 20px;
        padding-top: 50px; /* Add extra padding at the top to prevent overlap with close button */
        border-radius: 0;
        box-shadow: none;
    }
    .upsell-close {
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 4001;
        background-color: rgba(255, 255, 255, 0.9);
        width: 40px;
        height: 40px;
        font-size: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    /* Additional product photos section - only for mobile */
    .upsell-photos {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        margin-top: 15px;
        width: 100%;
    }
    .upsell-photo {
        width: calc(50% - 10px);
        aspect-ratio: 1;
        border-radius: 10px;
        object-fit: cover;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
}
.party-modal.party-invite-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(370px, 92vw);
    min-width: 220px;
    border-radius: 22px;
    padding: 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2001;
}
.invite-modal-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2.2em 1.2em 2.5em 1.2em;
    background: none;
}
.party-modal.party-invite-modal .accept-btn {
    margin-top: 1.3em;
    margin-bottom: 0.5em;
    box-shadow: 0 2px 12px #ffd70044;
}
.party-modal.party-invite-modal .accept-btn {
    margin-top: auto;
    margin-bottom: 22px;
    box-shadow: 0 2px 12px #ffd70044;
}
@media (max-width: 500px) {
    .party-modal.party-invite-modal {
        width: 96vw;
        max-width: 96vw;
        aspect-ratio: 1 / 1;
        min-width: 0;
        min-height: 0;
    }
    .party-modal.party-invite-modal .accept-btn {
        font-size: 1.08em;
        padding: 0.72em 1.3em;
    }
}
.eightbit-player {
    text-align: center;
    max-width: 600px;
    width: 100%;

}
.track-info {
    margin-bottom: 20px;
    font-size: 12px;
}
.eightbit-button {
    background-color: #ff00ff;
    color: #fff;
    border: 4px solid #ffff00;
    padding: 12px 24px;
    margin: 10px;
    cursor: pointer;
    font-size: 12px;
}

@media (max-width: 480px) {
    .player {
        padding: 1rem;
    }
    .control-button {
        width: 48px;
        height: 48px;
    }
}
.party-gated .party-cart-container,
.party-gated #inviteBtn,
.party-gated #inviteBtnInline,
.party-gated .shades-section,
.party-gated .cart-bubble {
    display: none !important;
}
.party-stepper-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 5000;
    background: #fff;
    box-shadow: 0 2px 10px #0001;
    padding: 0.25em 0 0.15em 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    transition: box-shadow 0.18s;
}
.party-stepper-track {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    position: relative;
    order: 1; /* Ensure it appears before the mobile bubble */
}
.party-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
.step-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eaeaea;
    border: 2px solid #bdbdbd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    color: #fff;
    position: relative;
    transition: background 0.18s, border 0.18s;
}
.party-step.active .step-circle,
.party-step.completed .step-circle {
    background: #60c12d;
    border-color: #60c12d;
}
.party-step.completed .step-check {
    display: inline;
}
.step-check {
    display: none;
    font-size: 1.18em;
    font-weight: bold;
    color: #fff;
}
.step-label {
    font-size: 0.98em;
    color: #444;
    margin-top: 0.19em;
    font-family: 'Quicksand', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
}
.step-line {
    flex: 1;
    height: 3px;
    background: #eaeaea;
    margin: 0 2px;
    border-radius: 2px;
    position: relative;
}
.party-step.completed + .step-line,
.party-step.active + .step-line {
    background: #60c12d;
}

/* ORLY Header Styling */
.orly-header {
    background-color: white;
    width: 100%;
    padding: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1002;
}

.orly-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.orly-logo {
    height: 40px;
    width: auto;
}
@media (min-width: 701px) {
    .party-stepper-bar { display: none !important; }
}
@media (max-width: 700px) {
    .party-stepper-bar { display: flex !important; }


    /* Position stepper at the top when scrolling */
    .party-stepper-bar {
        position: sticky !important;
        top: 0; /* Stick to the top of the viewport when scrolling */
        left: 0;
        right: 0;
        z-index: 1001;
        background: white; /* Match header background */
        margin: 0;
        padding: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Match header shadow */
    }
    .mobile-progress-container {
        box-shadow: 0 2px 12px #0002;
        background: #fff;
        border-radius: 12px;
        border: 1.5px solid #d2d2d2;
        margin: 0 auto 10px auto;
        padding: 10px 10px 6px 10px;
        position: relative;
        width: 100%;
        max-width: 99vw;
        display: flex;
        flex-direction: column;
    }
}

/* Referral Modal Styles */
.referral-product-container {
    margin: 15px auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 12px;
    background-color: rgba(162, 89, 247, 0.1);
    border-radius: 12px;
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
}

/* Free Gift Lock/Unlock Styles */
.free-gift-status {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 5px;
    font-size: 0.9em;
}

.free-gift-status.locked {
    background-color: rgba(255, 215, 0, 0.1);
    border: 1px dashed #ffd700;
}

.free-gift-status.unlocked {
    background-color: rgba(162, 89, 247, 0.1);
    border: 1px solid #a259f7;
}

.lock-icon, .unlock-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

.lock-message, .unlock-message {
    flex: 1;
}

.referral-product-loading {
    text-align: center;
    padding: 20px;
    color: #a259f7;
}

.referral-modal {
    padding: 1.8rem;
    max-width: 450px;
    width: 90vw;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2001;
    box-sizing: border-box;
}

.referral-modal .invite-modal-title {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.referral-modal .invite-modal-desc {
    width: 100%;
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

.referral-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 18px;
}

.referral-accept-btn,
.referral-skip-btn {
    font-size: 1.1rem;
    padding: 0.9rem 1.5rem;
    border-radius: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.13s, box-shadow 0.13s;
    border: none;
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.referral-accept-btn {
    background: linear-gradient(90deg, var(--pink), var(--gold));
    color: var(--white);
    box-shadow: 0 2px 8px #ffd70033;
}

.referral-skip-btn {
    background: transparent;
    color: var(--purple);
    border: 2px solid var(--purple);
}

/* Mobile styles for referral modal */
@media (max-width: 700px) {
    .referral-modal {
        padding: 1.5rem;
        width: 92vw;
        max-width: 92vw;
    }
    
    .referral-modal .invite-modal-title {
        font-size: 1.6rem;
        margin-bottom: 0.8rem;
    }
    
    .referral-modal .invite-modal-desc {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .referral-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .referral-accept-btn,
    .referral-skip-btn {
        width: 100%;
        max-width: 100%;
        padding: 0.8rem 1rem;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
}

.referral-accept-btn:hover,
.referral-skip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

@media (max-width: 700px) {
    /* Hide the party cart container but keep bubble functionality */
    .party-cart-container {
        opacity: 0;
        pointer-events: none;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: -1; /* Move behind other elements */
    }

    /* Mobile cart bubble styling */
    .mobile-cart-bubble {
        background: #fffbe6;
        color: var(--purple);
        font-weight: bold;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4), 0 2px 12px rgba(255, 105, 180, 0.4);
        padding: 0.8em 1em;
        margin: 0.5em 1em 0.8em 1em;
        width: calc(100% - 2em);
        max-width: 100%;
        box-sizing: border-box;
        text-align: center;
        font-family: 'Press Start 2P', cursive;
        font-size: 0.8rem;
        line-height: 1.4;
        animation: mobileSlideUp 0.5s ease-out, cartPulse 2s infinite;
        z-index: 1002;
        opacity: 1;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
        /* Position below the progress bar */
        position: relative;
        top: auto;
        bottom: auto;
        order: 2; /* Ensure it appears after the progress bar */
        margin-top: 10px; /* Add space between progress bar and bubble */
    }

    /* Animation for mobile bubble */
    @keyframes mobileSlideUp {
        0% { opacity: 0; transform: translateY(10px); }
        100% { opacity: 1; transform: translateY(0); }
    }

    /* Make sure original bubble is hidden on mobile */
    .party-cart-container .cart-bubble {
        display: none !important;
    }
}



.mobile-cart-inline{
    border:none;
    box-shadow: none !important;
    outline: none !important;
    background: transparent; /* keep background from changing */
    transition: none !important;

}
.mobile-cart-inline button,
.mobile-cart-inline button svg {
    box-shadow: none !important;
    outline: none !important;
    background: transparent; /* keep background from changing */
    transition: none !important;      /* if there was a transition on hover/focus */

}



.mobile-cart-inline {
    margin-left: auto; /* pushes the cart all the way to the right */
}

.mobile-cart-inline {
    margin-left: auto;
}

.party-cart {
    border: none;      /* remove the default button border */
    box-shadow: none !important;
    outline: none !important;
    background: transparent; /* keep background from changing */
    transition: none !important;     /* if there was a transition on hover/focus */

}
@keyframes upsellSlideIn {
    from { transform: translateX(100%); opacity:0; }
    to   { transform: translateX(0); opacity:1; }
}
.upsell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5em 1.2em 1.2em;
    width: 320px;
    max-width: 95vw;
}

@media (min-width: 700px) {
    .upsell-content {
        flex-direction: row;
        background: #fff7fe;
        border: 2px solid #a259f7;
        border-radius: 20px;
        width: 500px; /* Fixed width */
        min-height: 320px;
        align-items: stretch;
        padding: 1.8em;
    }
    
    .upsell-img-wrap {
        order: 1; /* Images on the left */
        margin-right: 1.5em;
        width: 200px;
    }
    
    .upsell-text {
        order: 2; /* Text on the right */
        width: calc(100% - 200px);
    }
}
.upsell-img-wrap { 
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    -ms-overflow-style: none;
    padding: 10px;
    background: transparent;
    width: 160px;
    box-sizing: border-box;
    box-shadow: none;
}

.upsell-img-wrap::-webkit-scrollbar {
    width: 3px;
}

.upsell-img-wrap::-webkit-scrollbar-thumb {
    background-color: rgba(162, 89, 247, 0.2);
    border-radius: 4px;
}

.upsell-img-wrap::-webkit-scrollbar-track {
    background: transparent;
}

/* Mobile layout - carousel arrangement */
@media (max-width: 699px) {
    .upsell-img-wrap {
        flex-direction: row;
        width: 100%;
        align-items: center;
        margin-right: 0;
        margin-bottom: 1em;
        position: relative;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 15px 0;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        height: auto;
        max-height: none;
        justify-content: flex-start;
    }
    
    .upsell-img-wrap::-webkit-scrollbar {
        display: none;
    }
}
.upsell-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    box-shadow: 0 2px 8px #0002;
    margin-top: 0;
    margin-bottom: 8px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

/* Main product image styling */
#upsellImg {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    margin-bottom: 8px;
    border: 2px solid #a259f7;
}

/* Additional product photos container */
.upsell-photos {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    align-items: center;
    padding-bottom: 0;
}

/* Mobile layout - no need for separate photos container */
@media (max-width: 699px) {
    .upsell-photos {
        display: none; /* Hide the separate photos container on mobile */
    }
}

.upsell-photo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

@media (max-width: 699px) {
    .upsell-content {
        padding-top: 0.8em;
        flex-direction: column;
    }
    
    .upsell-img-wrap {
        padding: 0;
        margin-top: 0.8em;
        margin-bottom: 0.2em;
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        order: 2;
    }
    
    .upsell-text {
        padding-top: 0;
        margin-top: 0;
        width: 100%;
        order: 1;
    }
    
    #upsellImg {
        width: 90px;
        height: 90px;
        flex-shrink: 0;
        margin: 0 6px;
        scroll-snap-align: center;
        border: 2px solid #a259f7;
    }
    
    .upsell-photo {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
        margin: 0 6px;
        scroll-snap-align: center;
        border: 2px solid #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        opacity: 0.8;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    
    .upsell-photo.active {
        opacity: 1;
        transform: scale(1.05);
        border-color: #a259f7;
    }
}

.upsell-photo:hover {
    transform: scale(1.1);
}

@media (min-width: 700px) {
    .upsell-text {
        flex: 1;
        min-width: 0; /* Allows text to wrap properly */
        padding-left: 1em;
        width: calc(100% - 210px);
    }
    
    .upsell-title {
        font-size: 1.4em;
        margin-bottom: 0.4em;
    }
    
    .upsell-desc {
        font-size: 1.05em;
        line-height: 1.6;
        max-width: 420px;
    }
}
.upsell-badge {
    background: linear-gradient(90deg,#ffd700,#a259f7);
    color: #fff; 
    font-weight: bold; 
    font-size: 0.9em;
    padding: 0.4em 1em; 
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    display: inline-block;
    margin: 0.7em 0 1em 0;
    align-self: flex-start;
}
.upsell-title { font-weight: bold; font-size: 1.18em; margin-bottom: 0.1em; color: #a259f7; }
.upsell-desc { font-size: 0.98em; line-height: 1.4; margin-bottom: 0.6em; color: #2d1b47; }
.upsell-price { margin-bottom: 0.9em; }
.upsell-limit { font-size: 0.92em; color: #a259f7; font-weight: bold; margin-bottom: 0.6em; }
.upsell-add-btn {
    background: linear-gradient(90deg,#a259f7,#ffd700);
    color: #fff; font-weight: bold;
    padding: 0.7em 1.3em;
    border: none; border-radius: 24px;
    font-size: 1.06em;
    box-shadow: 0 2px 8px #ffd70077;
    cursor: pointer;
    transition: background 0.17s;
}
.upsell-close {
    position: absolute; top: 12px; right: 12px;
    background: none; border: none; color: #a259f7;
    font-size: 1.5em; cursor: pointer;
    z-index: 10;
}
.upsell-confirm-prompt {
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.97);
    z-index: 1001;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.upsell-confirm-content {
    background: #faf3ff;
    border: 2px solid #a259f7;
    border-radius: 24px;
    box-shadow: 0 2px 24px rgba(162, 89, 247, 0.3);
    padding: 1.5em;
    max-width: 90%;
    width: 360px;
    text-align: center;
}
.upsell-confirm-content h3 {
    font-size: 1.2em;
    color: #2d1b47;
    margin-top: 0;
    margin-bottom: 0.8em;
    line-height: 1.3;
    font-weight: bold;
}

.upsell-confirm-content p {
    font-size: 1em;
    color: #2d1b47;
    margin-bottom: 1.5em;
    line-height: 1.5;
}
.upsell-confirm-btns {
    display: flex;
    gap: 1em;
    justify-content: center;
}
.upsell-confirm-close, .upsell-confirm-back {
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    padding: 0.8em 1.5em;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.17s;
    min-width: 140px;
}

.upsell-confirm-close {
    background: linear-gradient(90deg, #c183f5, #9d5cf0);
}

.upsell-confirm-back {
    background: linear-gradient(90deg, #9d5cf0, #5e9bf2);
}
.upsell-confirm-close:hover, .upsell-confirm-back:hover {
    filter: brightness(1.07);
}



/***** Cart Drawer & Overlay Styles *****/
.cart-drawer {
    position: fixed;
    top: 0; right: 0;
    width: 380px;
    max-width: 97vw;
    height: var(--app-height);
    background: #fff7fe;
    box-shadow: -8px 0 40px #a259f755, 0 2px 16px #0002;
    border-radius: 32px 0 0 32px;
    border: 3px solid #a259f7;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.36s cubic-bezier(.77,0,.18,1), opacity 0.18s;
    overflow: hidden;
    padding-bottom: var(--safe-area-bottom);
}
.cart-drawer.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}
.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2em 1.3em 0.7em 1.3em;
    border-bottom: 2px solid #ffd70044;
}
.cart-drawer-title {
    font-size: 1.25em;
    font-weight: bold;
    color: #a259f7;
    letter-spacing: 0.02em;
}
.cart-drawer-close {
    background: none; border: none; color: #a259f7;
    font-size: 1.65em; cursor: pointer;
    line-height: 1; border-radius: 50%; width: 38px; height: 38px;
    transition: background 0.18s;
}
.cart-drawer-close:focus, .cart-drawer-close:hover {
    background: #ffd70022;
}
.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.1em 1.3em 0.7em 1.3em;
    font-size: 1.04em;
    max-height: calc(var(--app-height) - 200px - var(--safe-area-bottom));
}
.cart-drawer-footer {
    padding: 1.1em 0 calc(1.8em + var(--safe-area-bottom));
    border-top: 2px solid #ffd70044;
    background: #fffbe6;
    border-radius: 0 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 0.7em;
    position: sticky;
    bottom: 0;
    width: 100%;
    z-index: 10;
    text-align: center;
    min-height: 150px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
}
.cart-drawer-subtotal {
    font-weight: bold;
    color: #2d1b47;
    font-size: 1.12em;
    text-align: center;
    width: 100%;
    display: block;
}
.cart-drawer-checkout {
    display: block;
    width: 90%;
    padding: 15px 0;
    background: linear-gradient(90deg, #a259f7 0%, #ffd700 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    margin: 15px auto 0;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.cart-drawer-checkout.disabled {
    background: linear-gradient(90deg, #cccccc 0%, #dddddd 100%);
    cursor: not-allowed;
    pointer-events: all;
}
.tooltip {
    visibility: hidden;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}
.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}
.cart-drawer-checkout.disabled:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transition: background 0.17s;
}
.cart-drawer-checkout:focus, .cart-drawer-checkout:hover {
    filter: brightness(1.07);
}
@media (max-width: 700px) {
    .cart-drawer {
        left: 0; right: 0; top: 0; bottom: 0;
        width: 100vw; max-width: 100vw; border-radius: 0;
        border: none;
        box-shadow: 0 0 40px #a259f766;
        transition: transform 0.36s cubic-bezier(.77,0,.18,1), opacity 0.18s;
    }
    .cart-drawer-footer { border-radius: 0 0 0 0; }
}



.cart-drawer-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.1em;
    gap: 1em;
    border-bottom: 1px solid #ffd70044;
    padding-bottom: 0.7em;
}
.cart-drawer-item-img {
    width: 56px; height: 56px; border-radius: 16px; background: #fff; box-shadow: 0 2px 8px #ffd70033;
    object-fit: cover;
}
.cart-drawer-item-details {
    flex: 1;
}
.cart-drawer-item-name {
    font-size: 1.04em;
    font-weight: bold;
    color: #a259f7;
    margin-bottom: 0.15em;
}
.cart-drawer-item-price {
    color: #2d1b47;
    font-size: 1em;
}
.cart-drawer-item-qty {
    color: #a259f7;
    font-size: 0.97em;
    margin-left: 0.5em;
}