/* frontend/css/atelier.css - Lady Vanilla Atelier Virtuel Studio */
/* Mobile-First, Highly Responsive, Interactive 3D/Layered Pastry Studio */

:root {
    --mint-bg: #b8dec9;
    --mint-light: #edf7f1;
    --mint-soft: #f4faf6;
    --mint-accent: #a3d4b8;
    --chocolate: #4a3525;
    --chocolate-light: #70533d;
    --chocolate-dark: #2f2117;
    --cream-card: #ffffff;
    --gold-accent: #d4a373;
    --gold-gradient: linear-gradient(135deg, #dfb76c 0%, #f6e3a1 50%, #c89e44 100%);
    --white: #ffffff;
    --border-subtle: rgba(74, 53, 37, 0.12);
    --shadow-soft: 0 10px 30px rgba(74, 53, 37, 0.08);
    --shadow-deep: 0 18px 45px rgba(74, 53, 37, 0.16);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Quicksand', sans-serif; -webkit-tap-highlight-color: transparent; }
body {
    background-color: var(--mint-light);
    color: var(--chocolate);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-serif { font-family: 'Playfair Display', serif; }

/* Atelier Header Bar */
.atelier-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1.5px solid var(--border-subtle);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.atelier-nav-left { display: flex; align-items: center; gap: 14px; }
.btn-back {
    text-decoration: none;
    color: var(--chocolate);
    font-weight: 700;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--mint-light);
    border: 1px solid var(--mint-bg);
    transition: all 0.2s;
}
.btn-back:hover { background: var(--mint-bg); transform: translateX(-2px); }

.atelier-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--chocolate); }
.atelier-brand-icon {
    width: 36px; height: 36px; border-radius: 10px; background: var(--chocolate);
    color: var(--mint-bg); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.atelier-brand-text h1 { font-size: 17px; font-weight: 700; line-height: 1.1; margin: 0; }
.atelier-brand-text span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--chocolate-light); }

.atelier-nav-right { display: flex; align-items: center; gap: 10px; }
.btn-cart-badge {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--chocolate);
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
}
.btn-cart-badge .cart-badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #c0392b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stepper Progress Bar */
.stepper-header {
    background: #fff;
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 16px;
    position: sticky;
    top: 64px;
    z-index: 900;
}

.step-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.step-counter {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--chocolate);
    display: flex;
    align-items: center;
    gap: 6px;
}
.step-counter .step-badge {
    background: var(--chocolate);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}
.step-progress-percent {
    font-size: 12px;
    font-weight: 700;
    color: var(--chocolate-light);
}

.progress-track {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mint-bg), var(--chocolate));
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* Stepper Scroll Wrapper with Left/Right Navigation Buttons */
.stepper-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 6px;
    margin-top: 6px;
    box-sizing: border-box;
}

.btn-stepper-scroll {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--border-subtle);
    background: #ffffff;
    color: var(--chocolate);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.btn-stepper-scroll:hover {
    background: var(--chocolate);
    color: #ffffff;
    border-color: var(--chocolate);
    transform: scale(1.08);
}

.btn-stepper-scroll:active {
    transform: scale(0.95);
}

/* Horizontal Scrollable Stepper Tabs */
.stepper-scroll {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-top: 4px;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 53, 37, 0.2) transparent;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
}
.stepper-scroll::-webkit-scrollbar {
    height: 3px;
}
.stepper-scroll::-webkit-scrollbar-thumb {
    background: rgba(74, 53, 37, 0.2);
    border-radius: 4px;
}
.stepper-pill {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 16px;
    background: var(--mint-light);
    border: 1px solid rgba(74,53,37,0.1);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--chocolate);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    user-select: none;
}
.stepper-pill.active {
    background: var(--chocolate);
    color: #fff;
    border-color: var(--chocolate);
    font-weight: 700;
}
.stepper-pill.completed {
    background: #e1f5eb;
    color: #1e6b45;
    border-color: #a3d4b8;
}

/* Main Studio Layout: Split Screen on Desktop, Sticky Top Cake on Mobile */
.atelier-container {
    display: grid;
    grid-template-columns: clamp(340px, 32vw, 440px) 1fr;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    flex-grow: 1;
    padding-bottom: 85px; /* Space for bottom action bar */
    min-width: 0;
}

/* Left Column: Visual Cake Stage */
.cake-studio-panel {
    background: radial-gradient(circle at 50% 30%, #ffffff 0%, #edf7f1 100%);
    border-right: 1.5px solid var(--border-subtle);
    padding: 16px 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: sticky;
    top: 130px;
    height: calc(100vh - 205px);
    overflow: hidden;
    min-width: 0;
}

/* Stage Control Bar (View Switcher + 3D Camera Controls) */
.stage-control-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    z-index: 10;
}

.view-mode-toggle {
    display: flex;
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 3px;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.view-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--chocolate);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.view-btn.active {
    background: var(--chocolate);
    color: #fff;
}

.stage-quick-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-3d-action {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: #fff;
    color: var(--chocolate);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    box-shadow: 0 3px 8px rgba(0,0,0,0.04);
}
.btn-3d-action:hover {
    background: var(--mint-light);
    color: var(--chocolate-dark);
    transform: scale(1.05);
}
.btn-3d-action.active {
    background: var(--chocolate);
    color: #fff;
}

/* Signature Fullscreen 3D Button */
.btn-fullscreen-main,
#btn-toggle-fullscreen-3d {
    background: linear-gradient(135deg, #4a3525 0%, #2b1f16 100%);
    color: #f7e6c4;
    border: 1.5px solid #d4a373;
    box-shadow: 0 3px 10px rgba(74, 53, 37, 0.25);
    position: relative;
    z-index: 25;
    flex-shrink: 0;
}
.btn-fullscreen-main:hover,
#btn-toggle-fullscreen-3d:hover {
    background: linear-gradient(135deg, #5c4230 0%, #3a2a1d 100%);
    color: #ffffff;
    border-color: #e2b98f;
    box-shadow: 0 4px 14px rgba(74, 53, 37, 0.35);
    transform: scale(1.06);
}
.btn-fullscreen-main:active,
#btn-toggle-fullscreen-3d:active {
    transform: scale(0.94);
}

/* Fullscreen Active Exit State for Button */
.cake-studio-panel.is-fullscreen-3d #btn-toggle-fullscreen-3d {
    width: auto !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, #a63a2a 0%, #7d1d12 100%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(166, 58, 42, 0.38) !important;
    gap: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}
.cake-studio-panel.is-fullscreen-3d #btn-toggle-fullscreen-3d .fs-btn-text {
    display: inline-block !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
}

/* Nav AI and Key Badge */
.btn-key-badge {
    background: #fff;
    border: 1px solid var(--border-subtle);
    color: var(--chocolate);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-key-badge.has-key {
    background: #e8f5e9;
    border-color: #81c784;
    color: #2e7d32;
}
.btn-nav-ai {
    background: linear-gradient(135deg, #4a3525 0%, #2f2117 100%);
    color: #fff;
    border: 1px solid #d4a373;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(74, 53, 37, 0.2);
    transition: all 0.2s;
}
.btn-nav-ai:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 53, 37, 0.3);
}

/* 3D WebGL Cake Stage */
.cake-3d-stage {
    width: 100%;
    flex: 1 1 auto;
    min-height: 320px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 35%, #ffffff 0%, #eef7f2 100%);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.03);
}

.cake-webgl-mount {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: grab;
}
.cake-webgl-mount:active {
    cursor: grabbing;
}

.touch-hint-pill {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(74, 53, 37, 0.12);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 11px;
    color: var(--chocolate-light);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    animation: fadeInOut 4s infinite alternate;
}
@keyframes fadeInOut { 0% { opacity: 0.6; } 100% { opacity: 0.95; } }

/* AI Generation CTA Button */
.btn-generate-ai-photo {
    width: 100%;
    margin-top: 10px;
    background: linear-gradient(135deg, #2d6a4f 0%, #1b4332 100%);
    color: #fff;
    border: 1.5px solid #b8dec9;
    padding: 10px 16px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 18px rgba(45, 106, 79, 0.22);
    transition: all 0.25s ease;
    text-align: left;
}
.btn-generate-ai-photo:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(45, 106, 79, 0.35);
    background: linear-gradient(135deg, #357a5b 0%, #22533e 100%);
}
.btn-generate-ai-photo i {
    font-size: 18px;
    color: #b8dec9;
}
.ai-cta-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.ai-cta-text span {
    display: block;
    font-size: 10.5px;
    opacity: 0.85;
}

/* Rotating Cake Stand with Pedestal */
.cake-stand-pedestal {
    width: 270px;
    height: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #e0deda 45%, #b5b0a8 100%);
    border-radius: 50% / 100%;
    box-shadow: 0 16px 30px rgba(74, 53, 37, 0.22);
    position: relative;
    z-index: 2;
}
.cake-stand-pedestal::after {
    content: '';
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 24px;
    background: linear-gradient(180deg, #c7c3bd 0%, #8c8780 100%);
    clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
    border-radius: 0 0 14px 14px;
}

/* Cake Stack Structure */
.cake-stack {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    margin-bottom: -6px;
    z-index: 5;
    transition: all 0.4s ease;
}

/* Individual Tier Construction */
.cake-tier {
    position: relative;
    border-radius: 18px 18px 12px 12px;
    box-shadow: inset 0 -6px 14px rgba(0,0,0,0.12), 0 10px 22px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tier-bottom { width: 230px; height: 95px; }
.tier-middle { width: 175px; height: 85px; }
.tier-top    { width: 125px; height: 75px; }

/* Silhouettes / Shapes */
.cake-stack.shape-heart .cake-tier {
    clip-path: polygon(50% 12%, 66% 0, 86% 0, 100% 22%, 100% 48%, 50% 96%, 0 48%, 0 22%, 14% 0, 34% 0);
    border-radius: 0;
}
.cake-stack.shape-square .cake-tier {
    border-radius: 8px;
}

/* Internal Layers (Sponge & Cream) */
.sponge-layer {
    flex: 1;
    transition: background 0.4s ease;
}
.cream-layer {
    height: 14px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.12);
    transition: background 0.4s ease;
}

/* Outer Frosting / Ganache Coating */
.frosting-coating {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.92;
    transition: background 0.4s ease, opacity 0.3s ease;
    pointer-events: none;
}
/* In "Coupe Intérieure" mode, reveal inner layers */
.view-coupe .frosting-coating {
    opacity: 0.18;
}

/* Ganache Drip */
.choc-drip-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 26px;
    background: radial-gradient(circle at 10px 2px, #4a3525 8px, transparent 9px) repeat-x;
    background-size: 20px 26px;
    opacity: 0.9;
    pointer-events: none;
    z-index: 6;
    animation: dripAppear 0.4s ease;
}
@keyframes dripAppear {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 0.9; }
}

/* Cake Topper & Inscription */
.cake-topper-display {
    position: absolute;
    top: -46px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
    animation: popTopper 0.35s ease;
}
@keyframes popTopper {
    0% { transform: translateX(-50%) scale(0); opacity: 0; }
    80% { transform: translateX(-50%) scale(1.15); opacity: 1; }
    100% { transform: translateX(-50%) scale(1); }
}

.topper-choc {
    background: #4a3525;
    color: #fff;
    padding: 6px 16px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    border: 1.5px solid rgba(255,255,255,0.4);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topper-choc::after, .topper-gold::after {
    content: ''; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
    width: 3px; height: 12px; background: rgba(74,53,37,0.8);
}
.topper-gold {
    background: var(--gold-gradient);
    color: #3b281b;
    padding: 7px 18px;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 800;
    font-family: 'Playfair Display', serif;
    box-shadow: 0 6px 20px rgba(212,163,115,0.5);
    border: 2px solid #fff;
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Decorations Cluster */
.decorations-cluster {
    position: absolute;
    top: -18px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 15;
    pointer-events: none;
}
.deco-badge {
    font-size: 22px;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25));
    animation: popTopper 0.3s ease;
}

/* Live Specifications Badges */
.cake-specs-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-top: 15px;
}
.spec-tag {
    background: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--chocolate);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

/* Right Column: Dynamic Steps Studio Pane */
.step-wizard-panel {
    padding: 24px 32px 60px;
    overflow-y: auto;
    height: calc(100vh - 205px);
    min-width: 0;
    box-sizing: border-box;
}

.step-intro { margin-bottom: 25px; }
.step-intro h2 { font-size: 24px; color: var(--chocolate); margin-bottom: 6px; }
.step-intro p { font-size: 14px; color: #666; }

/* Grid of Rich Touch-Friendly Option Cards */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.option-card {
    background: var(--cream-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    user-select: none;
}
.option-card:hover {
    border-color: var(--chocolate);
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}
.option-card.selected {
    border-color: var(--chocolate);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 53, 37, 0.12), var(--shadow-soft);
    transform: translateY(-2px);
}
.option-card.selected::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 12px;
    color: var(--chocolate);
    font-size: 13px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--mint-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Option Content Styling */
.option-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.option-icon {
    width: 44px; height: 44px; border-radius: 12px; background: var(--mint-light);
    display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--chocolate);
    flex-shrink: 0;
}
.option-card.selected .option-icon {
    background: var(--chocolate);
    color: var(--mint-bg);
}
.option-title { font-size: 15px; font-weight: 700; color: var(--chocolate); line-height: 1.25; }
.option-desc { font-size: 12px; color: #777; line-height: 1.45; margin-bottom: 12px; flex-grow: 1; }

.option-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 10px; border-top: 1px solid rgba(74,53,37,0.06);
}
.price-pill {
    padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700;
}
.price-pill.included { background: var(--mint-light); color: var(--chocolate); }
.price-pill.extra { background: #fef0db; color: #b45b10; }

/* Swatch Color Circles */
.swatch-circle {
    width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15); display: inline-block;
}

/* Step 8 Custom Inscription Box */
.inscription-studio-card {
    background: #fff;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-soft);
}
.inscription-input-wrap {
    position: relative;
    margin: 15px 0 25px;
}
.inscription-input-wrap input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    border: 2px solid #dcdad5;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    color: var(--chocolate);
    transition: all 0.2s;
}
.inscription-input-wrap input:focus {
    border-color: var(--chocolate);
    box-shadow: 0 0 0 4px rgba(74,53,37,0.1);
}
.topper-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Step 9 Upload Area */
.upload-dropzone {
    border: 2.5px dashed var(--chocolate);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    background: var(--mint-soft);
    cursor: pointer;
    transition: all 0.2s;
}
.upload-dropzone:hover {
    background: #e2f2e9;
    transform: scale(1.01);
}

/* Step 11 Summary Breakdown Card */
.recap-master-card {
    background: #fff;
    border: 2px solid var(--mint-bg);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 25px;
}
.recap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 13.5px;
}
.recap-item {
    background: var(--mint-soft);
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(184, 222, 201, 0.4);
}
.recap-item strong { color: var(--chocolate); }

.deposit-card-box {
    background: var(--cream-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.deposit-btn-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.deposit-pill-btn {
    padding: 12px 10px;
    border-radius: 14px;
    border: 2px solid #dcdad5;
    background: #fff;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--chocolate);
    transition: all 0.2s;
}
.deposit-pill-btn.active {
    border-color: var(--chocolate);
    background: var(--chocolate);
    color: #fff;
    box-shadow: 0 4px 12px rgba(74,53,37,0.25);
}

/* Fixed Bottom Action Bar */
.atelier-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-top: 1.5px solid var(--border-subtle);
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.06);
}

.bottom-price-info { display: flex; flex-direction: column; }
.price-tag-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #777; }
.price-tag-amount { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--chocolate); line-height: 1.1; }
.price-tag-sub { font-size: 11.5px; color: var(--chocolate-light); font-weight: 600; }

.bottom-nav-actions { display: flex; gap: 10px; align-items: center; }
.btn-nav-prev {
    background: transparent;
    color: var(--chocolate);
    border: 1.5px solid var(--chocolate);
    padding: 11px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-nav-prev:hover { background: var(--mint-light); }

.btn-nav-next {
    background: var(--chocolate);
    color: #fff;
    border: none;
    padding: 12px 26px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(74,53,37,0.22);
    transition: all 0.2s;
}
.btn-nav-next:hover {
    background: var(--chocolate-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(74,53,37,0.3);
}

/* Toast notifications */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: var(--chocolate); color: #fff; padding: 12px 20px; border-radius: 14px;
    font-size: 13.5px; display: flex; align-items: center; gap: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    animation: toastIn 0.3s ease; border-left: 4px solid var(--mint-bg);
}
@keyframes toastIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ========================================== */
/* PHONE & TABLET RESPONSIVE OPTIMIZATIONS    */
/* ========================================== */
@media (max-width: 980px) {
    /* Lock viewport on phone for native app experience (Capacitor iOS/Android Ready) */
    html, body {
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden !important;
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }

    /* Ultra-sleek Nav Header */
    .atelier-nav {
        padding: 6px 12px;
        height: 48px;
        flex-shrink: 0;
        box-sizing: border-box;
    }
    .atelier-nav-left { gap: 8px; }
    .atelier-nav-right { gap: 6px; }
    .btn-back { padding: 6px 10px; font-size: 12px; }
    .btn-back span { display: none; }
    .atelier-brand-icon { width: 30px; height: 30px; font-size: 15px; }
    .atelier-brand-text h1 { font-size: 15px; }
    .atelier-brand-text span { display: none; }
    .btn-nav-ai span { display: none; }
    .btn-key-badge span { display: none; }
    .btn-cart-badge { width: 34px; height: 34px; font-size: 13px; }

    /* Compact Stepper Tracker */
    .stepper-header {
        padding: 4px 12px;
        background: #ffffff;
        border-bottom: 1px solid var(--border-subtle);
        flex-shrink: 0;
        box-sizing: border-box;
    }
    .step-status-bar {
        margin-bottom: 3px;
    }
    .step-counter {
        font-size: 11.5px;
    }
    .step-progress-percent {
        font-size: 11px;
    }
    .progress-track {
        height: 4px;
    }
    .stepper-scroll {
        padding-top: 4px;
        padding-bottom: 2px;
        gap: 6px;
    }
    .stepper-pill {
        padding: 3px 9px;
        font-size: 10.5px;
        border-radius: 12px;
    }

    /* Main Container: Split Studio Layout (Top 3D Stage + Bottom Smooth Scrolling Options) */
    .atelier-container {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        height: calc(100dvh - 48px - 46px);
        max-height: calc(100dvh - 48px - 46px);
        overflow: hidden;
        padding-bottom: 0;
        margin: 0;
        width: 100%;
        position: relative;
    }

    /* Top 3D Stage: Compact, Fixed in Top Half, Real-time Visuals */
    .cake-studio-panel {
        position: relative;
        top: 0;
        height: clamp(190px, 30vh, 235px);
        min-height: clamp(190px, 30vh, 235px);
        max-height: clamp(190px, 30vh, 235px);
        flex-shrink: 0;
        padding: 6px 10px;
        border-right: none;
        border-bottom: 2px solid var(--border-subtle);
        box-shadow: 0 4px 14px rgba(74, 53, 37, 0.08);
        background: radial-gradient(circle at 50% 35%, #ffffff 0%, #eef7f2 100%);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
        z-index: 10;
        box-sizing: border-box;
        transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .cake-studio-panel.placement-active {
        height: clamp(260px, 38vh, 340px);
        min-height: clamp(260px, 38vh, 340px);
        max-height: clamp(260px, 38vh, 340px);
    }

    .btn-stepper-scroll {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .stage-control-bar {
        margin-bottom: 4px;
        z-index: 25;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }
    .view-mode-toggle {
        transform: none;
        padding: 2px;
        gap: 2px;
        border-radius: 18px;
        flex-shrink: 0;
    }
    .view-btn {
        padding: 4px 7px;
        font-size: 10.5px;
        font-weight: 700;
        border-radius: 14px;
        gap: 3px;
    }
    .view-btn i {
        font-size: 10.5px;
    }
    .stage-quick-actions {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-shrink: 0;
    }
    /* Hide desktop-only zoom +/- buttons on touchscreens so fullscreen button is 100% visible */
    #btn-zoom-in,
    #btn-zoom-out {
        display: none !important;
    }
    .btn-3d-action {
        width: 32px;
        height: 32px;
        font-size: 12px;
        flex-shrink: 0;
    }
    /* Fullscreen button priority and high visibility on mobile */
    #btn-toggle-fullscreen-3d {
        display: flex !important;
        background: linear-gradient(135deg, #4a3525 0%, #2b1f16 100%) !important;
        color: #fcebd2 !important;
        border: 1.5px solid #d4a373 !important;
        box-shadow: 0 3px 8px rgba(74, 53, 37, 0.3) !important;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        flex-shrink: 0;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    #btn-toggle-fullscreen-3d:active {
        transform: scale(0.92);
        background: #d4a373 !important;
        color: #2b1f16 !important;
    }

    .cake-3d-stage {
        flex: 1 1 auto;
        height: 100%;
        min-height: 0;
        max-height: 100%;
        position: relative;
        touch-action: none !important;
    }
    .cake-webgl-mount,
    .cake-webgl-mount canvas {
        touch-action: none !important;
        user-select: none;
        -webkit-user-select: none;
    }

    /* Floating compact AI Photo button on 3D Stage on mobile */
    .btn-generate-ai-photo {
        position: absolute;
        bottom: 6px;
        right: 8px;
        width: auto;
        margin-top: 0;
        padding: 5px 11px;
        border-radius: 18px;
        background: rgba(27, 67, 50, 0.94);
        backdrop-filter: blur(8px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        z-index: 15;
        gap: 5px;
        border: 1px solid rgba(184, 222, 201, 0.4);
    }
    .btn-generate-ai-photo i {
        font-size: 12px;
        color: var(--mint-bg);
    }
    .ai-cta-text strong {
        font-size: 10.5px;
    }
    .ai-cta-text span {
        display: none;
    }
    .btn-generate-ai-photo i.fa-arrow-right {
        display: none;
    }

    .touch-hint-pill {
        bottom: 6px;
        left: 8px;
        transform: none;
        font-size: 9px;
        padding: 4px 8px;
        max-width: 105px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        z-index: 15;
    }

    .cake-specs-pills {
        display: none; /* Hidden on phone to maximize 3D viewing area */
    }

    /* Lower Section: Native Scrollable Options Panel */
    .step-wizard-panel {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px 14px 75px 14px; /* Generous bottom padding so cards are never covered by dock */
        min-height: 0;
        background: var(--mint-light);
        box-sizing: border-box;
    }

    .step-intro {
        margin-bottom: 10px;
    }
    .step-intro h2 {
        font-size: 16.5px;
        line-height: 1.25;
        margin-bottom: 3px;
    }
    .step-intro p {
        font-size: 11.5px;
        color: #666;
    }

    .options-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
        gap: 8px;
    }
    .option-card {
        padding: 10px 10px;
        border-radius: 14px;
    }
    .option-top {
        gap: 6px;
        margin-bottom: 4px;
    }
    .option-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
        border-radius: 8px;
    }
    .option-title {
        font-size: 12px;
        line-height: 1.2;
    }
    .option-desc {
        font-size: 10px;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    .option-footer {
        padding-top: 4px;
    }
    .option-price-tag {
        font-size: 11px;
    }

    .topper-options-grid { grid-template-columns: 1fr; }
    .recap-grid { grid-template-columns: 1fr; }
    .deposit-btn-row { grid-template-columns: 1fr 1fr; gap: 8px; }

    /* Bottom Action Bar: Native Mobile App Dock */
    .atelier-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        padding: 6px 14px calc(6px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-subtle);
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 1000;
        box-sizing: border-box;
    }

    .bottom-price-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .price-tag-title {
        font-size: 9px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #888;
    }
    .price-tag-amount {
        font-size: 16.5px;
        font-weight: 800;
        line-height: 1.1;
    }
    .price-tag-sub {
        font-size: 9.5px;
        color: #2d6a4f;
    }

    .bottom-nav-actions {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .btn-nav-prev {
        padding: 8px 12px;
        font-size: 11.5px;
        border-radius: 12px;
    }
    .btn-nav-next {
        padding: 9px 16px;
        font-size: 12.5px;
        border-radius: 12px;
    }

    /* Mobile Fullscreen 3D Stage Adjustments */
    .cake-studio-panel.is-fullscreen-3d {
        padding: 0 !important;
    }
    .cake-studio-panel.is-fullscreen-3d .stage-control-bar {
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        z-index: 300 !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }
    .cake-studio-panel.is-fullscreen-3d .stage-quick-actions {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }
    .cake-studio-panel.is-fullscreen-3d #btn-toggle-fs-dock {
        display: none !important;
    }
    .cake-studio-panel.is-fullscreen-3d #btn-toggle-fullscreen-3d {
        padding: 4px 8px !important;
        font-size: 10.5px !important;
        gap: 4px !important;
    }
    .cake-studio-panel.is-fullscreen-3d #btn-toggle-fullscreen-3d .fs-btn-text {
        font-size: 10px !important;
    }
    .cake-studio-panel.is-fullscreen-3d .stage-fullscreen-stepper {
        top: 50px !important;
        max-width: calc(100% - 16px) !important;
        padding: 4px 6px !important;
        border-radius: 18px !important;
        z-index: 280 !important;
    }
    .cake-studio-panel.is-fullscreen-3d .fs-stepper-pill {
        padding: 4px 9px !important;
        font-size: 10.5px !important;
    }
    .cake-studio-panel.is-fullscreen-3d .stage-fullscreen-bottom-bar {
        bottom: 10px !important;
        left: 8px !important;
        right: 8px !important;
        transform: none !important;
        width: calc(100% - 16px) !important;
        max-width: none !important;
        padding: 8px 12px !important;
        border-radius: 20px !important;
        z-index: 290 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22) !important;
    }
    .cake-studio-panel.is-fullscreen-3d .fs-price-step-badge {
        font-size: 9.5px !important;
    }
    .cake-studio-panel.is-fullscreen-3d .fs-price-amount {
        font-size: 15.5px !important;
    }
    .cake-studio-panel.is-fullscreen-3d .btn-fs-toggle-dock {
        padding: 7px 12px !important;
        font-size: 11.5px !important;
    }
    .cake-studio-panel.is-fullscreen-3d .btn-fs-nav-next {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }
    .cake-studio-panel.is-fullscreen-3d .stage-fullscreen-dock {
        bottom: 68px !important;
        left: 6px !important;
        right: 6px !important;
        max-height: 58vh !important;
        border-radius: 18px !important;
        z-index: 350 !important;
    }
    /* In fullscreen mode on phone, hide redundant bottom floating pills so bottom HUD is pristine */
    .cake-studio-panel.is-fullscreen-3d .touch-hint-pill {
        display: none !important;
    }
    .cake-studio-panel.is-fullscreen-3d .btn-generate-ai-photo {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .option-card {
        padding: 8px 8px;
    }
    .comparison-grid { grid-template-columns: 1fr; }
}

@media (max-width: 280px) {
    .options-grid { grid-template-columns: 1fr; }
    .atelier-nav { padding: 4px 6px; }
    .atelier-brand-text h1 { font-size: 12px; }
    .btn-back { padding: 4px 6px; }
    .btn-cart-badge { width: 28px; height: 28px; font-size: 10px; }
    .btn-nav-next { padding: 8px 10px; font-size: 11px; }
}

/* ========================================== */
/* MODALS: GEMINI KEY & AI RENDER COMPARISON  */
/* ========================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 15, 10, 0.78);
    backdrop-filter: blur(8px);
    z-index: 100005 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.25s ease;
    overflow: hidden;
}
.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.modal-card.ai-render-card {
    max-width: 780px;
    width: 96vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}

@keyframes modalScaleUp {
    from { transform: scale(0.94) translateY(14px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    padding: 12px 18px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: #fff;
    z-index: 2;
}

.modal-body {
    padding: 14px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
}

.modal-footer {
    padding: 10px 18px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: #fff;
    z-index: 2;
}

.btn-modal-close {
    background: #f5f3f0;
    border: none;
    font-size: 22px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.btn-modal-close:hover { background: #eae5de; color: #222; }

.gemini-badge-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #b8dec9 0%, #2d6a4f 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.gemini-badge-icon.pulse-glow {
    animation: pulseGlow 2s infinite;
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.5); }
    70% { box-shadow: 0 0 0 14px rgba(45, 106, 79, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 106, 79, 0); }
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: center;
}
.comparison-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}
.comparison-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
}
.comparison-label.highlight {
    color: #2d6a4f;
}
.comparison-img-wrap {
    width: 100%;
    max-width: 280px;
    max-height: 34vh;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #e0deda;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: #fdfbf7;
    display: flex;
    align-items: center;
    justify-content: center;
}
.comparison-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 520px) {
    .modal-card.ai-render-card {
        width: 98vw;
        max-height: 92vh;
    }
    .comparison-grid {
        gap: 8px;
    }
    .comparison-img-wrap {
        max-height: 25vh;
        max-width: 160px;
    }
    .modal-header {
        padding: 10px 14px;
    }
    .modal-body {
        padding: 10px 14px;
    }
    .modal-footer {
        padding: 8px 14px;
    }
    .form-row {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================== */
/* ATELIER EXPRESS CHECKOUT & SUCCESS MODALS  */
/* ========================================== */
.modal-card.checkout-card {
    max-width: 640px;
    width: 96vw;
    max-height: 92vh;
}

.checkout-cake-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #f4faf6 0%, #e8f5ed 100%);
    border: 1.5px solid #b8dec9;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.checkout-cake-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: cover;
    background: #fff;
    flex-shrink: 0;
}

.checkout-cake-info {
    flex: 1;
    min-width: 0;
}

.checkout-cake-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #1b4332;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-cake-sub {
    font-size: 12px;
    color: #4a5568;
    line-height: 1.3;
}

.form-group {
    margin-bottom: 12px;
}

.form-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--chocolate);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.form-input {
    width: 100%;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1.5px solid #d5cec6;
    font-size: 13.5px;
    outline: none;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #2d6a4f;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pill-radio-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill-radio-option {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1.5px solid #d5cec6;
    border-radius: 12px;
    cursor: pointer;
    background: #faf8f5;
    transition: all 0.2s;
    font-size: 12.5px;
    font-weight: 600;
    color: #444;
}

.pill-radio-option:hover {
    border-color: #2d6a4f;
}

.pill-radio-option.selected {
    border-color: #2d6a4f;
    background: #e8f5ed;
    color: #1b4332;
    font-weight: 700;
}

.pill-radio-option input[type="radio"] {
    accent-color: #2d6a4f;
}

.breakdown-card {
    background: #faf8f5;
    border: 1.5px solid rgba(74, 53, 37, 0.1);
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 10px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 5px;
    color: #555;
}

.breakdown-row.total {
    border-top: 1.5px solid #ddd;
    margin-top: 8px;
    padding-top: 8px;
    font-weight: 700;
    font-size: 15.5px;
    color: var(--chocolate);
}

.breakdown-row.deposit {
    color: #2d6a4f;
    font-weight: 700;
}

.btn-checkout-confirm {
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, #2d6a4f 0%, #1b4332 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(45, 106, 79, 0.3);
    transition: all 0.2s;
}

.btn-checkout-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 106, 79, 0.4);
}

.btn-checkout-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success Modal */
.modal-card.success-card {
    max-width: 540px;
    width: 95vw;
    text-align: center;
    padding: 24px 20px;
}

.success-icon-badge {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b8dec9 0%, #2d6a4f 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 14px auto;
    box-shadow: 0 6px 20px rgba(45, 106, 79, 0.35);
}

.success-order-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e8f5ed;
    color: #1b4332;
    border: 1.5px solid #a3d4b8;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.success-summary-box {
    background: #faf8f5;
    border: 1px solid #e5dfd7;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 18px;
    text-align: left;
    font-size: 13px;
}

.success-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: #555;
}

.success-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.btn-success-erp {
    background: linear-gradient(135deg, #4a3525 0%, #2f2117 100%);
    color: #fff;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(74, 53, 37, 0.25);
    transition: all 0.2s;
}

.btn-success-erp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(74, 53, 37, 0.35);
}

.btn-success-secondary {
    background: #fff;
    border: 1.5px solid #2d6a4f;
    color: #2d6a4f;
    text-decoration: none;
    padding: 11px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-success-secondary:hover {
    background: #e8f5ed;
}

/* ======================================================= */
/* DECOR TEMPLATES, QUANTITY STEPPER & 3D PLACEMENT UI     */
/* ======================================================= */

/* Decor Templates Strip */
.templates-container {
    background: #fff;
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 14px;
}
.templates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.templates-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--chocolate);
    display: flex;
    align-items: center;
    gap: 6px;
}
.templates-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}
.template-chip {
    flex-shrink: 0;
    background: var(--mint-light);
    border: 1.5px solid var(--mint-bg);
    border-radius: 14px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    max-width: 210px;
}
.template-chip:hover {
    border-color: var(--chocolate);
    background: #fff;
    transform: translateY(-2px);
}
.template-chip-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--chocolate);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.template-chip-desc {
    font-size: 10px;
    color: #666;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Quantity Stepper on Decor Cards */
.decor-qty-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-subtle);
}
.decor-stepper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 20px;
    padding: 2px 6px;
}
.btn-qty {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: var(--chocolate);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.15s;
}
.btn-qty:hover {
    background: var(--chocolate-dark);
    transform: scale(1.1);
}
.qty-display {
    min-width: 22px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--chocolate);
}
.decor-subtotal-tag {
    font-size: 11px;
    font-weight: 700;
    color: #166534;
}

/* 3D Placement Bar & Precision Sliders - Floating Glassmorphic Overlay */
.stage-placement-panel {
    position: absolute;
    bottom: 8px;
    left: 10px;
    right: 10px;
    max-width: 440px;
    margin: 0 auto;
    z-index: 70;
    max-height: calc(100% - 30px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(212, 163, 115, 0.45);
    border-radius: 16px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 10px 32px rgba(74, 53, 37, 0.22);
    box-sizing: border-box;
    animation: slideUpPlacement 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpPlacement {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stage-placement-panel::-webkit-scrollbar {
    width: 4px;
}
.stage-placement-panel::-webkit-scrollbar-thumb {
    background: rgba(74, 53, 37, 0.25);
    border-radius: 4px;
}

.placement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--chocolate);
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(74, 53, 37, 0.08);
}

.btn-close-placement {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 15px;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.15s;
}
.btn-close-placement:hover {
    color: var(--chocolate);
    background: rgba(74, 53, 37, 0.08);
}

.btn-minimize-placement {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-minimize-placement:hover {
    color: var(--chocolate);
    background: rgba(74, 53, 37, 0.08);
}

/* Minimized Floating Pill Mode */
.stage-placement-panel.is-minimized {
    max-height: 40px !important;
    min-height: 40px !important;
    padding: 6px 12px !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    gap: 0 !important;
    box-shadow: 0 4px 18px rgba(74, 53, 37, 0.22) !important;
}

.stage-placement-panel.is-minimized .placement-body {
    display: none !important;
}

.stage-placement-panel.is-minimized .placement-header {
    border-bottom: none;
    padding-bottom: 0;
}

.placement-minimized-summary {
    background: rgba(212, 163, 115, 0.2);
    color: var(--chocolate);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    white-space: nowrap;
}

.btn-piece-nav {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: #fff;
    color: var(--chocolate);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    flex-shrink: 0;
    transition: all 0.2s;
}
.btn-piece-nav:hover {
    background: var(--chocolate);
    color: #fff;
}

.placement-piece-select {
    padding: 4px 8px;
    font-size: 11.5px;
    height: 28px;
    flex: 1;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: #fff;
    color: var(--chocolate);
    font-weight: 600;
}

/* Zone Switcher Segmented Control */
.placement-zone-pills {
    display: flex;
    gap: 4px;
    background: rgba(74, 53, 37, 0.06);
    padding: 3px;
    border-radius: 12px;
    border: 1px solid rgba(212, 163, 115, 0.28);
}

.btn-zone-pill {
    flex: 1;
    border: none;
    background: transparent;
    color: #6d5849;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-zone-pill:hover {
    color: var(--chocolate);
    background: rgba(255, 255, 255, 0.65);
}

.btn-zone-pill.active {
    background: linear-gradient(135deg, var(--chocolate) 0%, #301f16 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(74, 53, 37, 0.25);
}

.btn-zone-pill.active i {
    color: #f7d794;
}

.placement-tap-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: #7a6352;
    background: rgba(212, 163, 115, 0.12);
    padding: 5px 9px;
    border-radius: 8px;
    margin-top: 3px;
    line-height: 1.35;
}
.placement-tap-hint i {
    color: var(--gold, #d4af37);
    font-size: 11px;
    flex-shrink: 0;
}

.placement-sliders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}

@media (max-width: 480px) {
    .placement-sliders-grid { grid-template-columns: 1fr; }
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.slider-group label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.slider-group label span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
}
.slider-group label strong {
    font-size: 11px;
    color: var(--chocolate);
}

.placement-slider {
    width: 100%;
    accent-color: var(--chocolate);
    cursor: pointer;
    height: 6px;
}

.placement-actions-row {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: flex-end;
}

.btn-placement-action {
    flex: 1;
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    color: #555;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s;
    height: 28px;
}
.btn-placement-action:hover {
    background: #f0f0f0;
    color: var(--chocolate);
    border-color: #bbb;
}

.btn-placement-action.btn-placement-remove {
    background: #fff0f0;
    border-color: #ffd2d2;
    color: #c0392b;
}
.btn-placement-action.btn-placement-remove:hover {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}

/* When placement panel is open, tuck away conflicting stage badges */
.cake-studio-panel.placement-active .cake-specs-pills,
.cake-studio-panel.placement-active .btn-generate-ai-photo,
.cake-studio-panel.placement-active .touch-hint-pill {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Mobile Placement Panel: Docked cleanly above bottom bar so 3D cake canvas is 100% visible */
@media (max-width: 980px) {
    .stage-placement-panel {
        position: fixed !important;
        bottom: 68px !important;
        left: 8px !important;
        right: 8px !important;
        max-width: 460px !important;
        margin: 0 auto !important;
        z-index: 1500 !important;
        max-height: min(45vh, 290px) !important;
        overflow-y: auto !important;
        padding: 8px 10px !important;
        gap: 6px !important;
        border-radius: 16px !important;
        box-shadow: 0 -8px 28px rgba(74, 53, 37, 0.32) !important;
    }

    .stage-placement-panel.is-minimized {
        max-height: 40px !important;
        min-height: 40px !important;
        bottom: 68px !important;
        padding: 6px 12px !important;
    }
}

/* Direct Inscription Mode Selector */
.inscription-mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
@media (max-width: 550px) {
    .inscription-mode-selector { grid-template-columns: 1fr; }
}
.mode-option-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 2px solid var(--border-subtle);
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}
.mode-option-btn.active {
    border-color: var(--chocolate);
    background: var(--mint-light);
}
.piping-color-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    margin-bottom: 14px;
}
.piping-color-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1.5px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 700;
}
.piping-color-pill.active {
    border-color: var(--chocolate);
    background: var(--mint-light);
}
.piping-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
}

/* ========================================== */
/* DÉCOR CATEGORY FILTER TABS (STEP 7)        */
/* ========================================== */
.decor-filter-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.btn-filter-scroll {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border-subtle);
    background: #ffffff;
    color: var(--chocolate);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

.btn-filter-scroll:hover {
    background: var(--chocolate);
    color: #ffffff;
    border-color: var(--chocolate);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(74, 53, 37, 0.2);
}

.btn-filter-scroll:active {
    transform: scale(0.96);
}

.decor-filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 4px 6px 4px;
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 53, 37, 0.2) transparent;
    flex: 1 1 auto;
}

.decor-filter-bar::-webkit-scrollbar {
    height: 4px;
}

.decor-filter-bar::-webkit-scrollbar-thumb {
    background: rgba(74, 53, 37, 0.25);
    border-radius: 4px;
}

.decor-filter-bar::-webkit-scrollbar-thumb:hover {
    background: var(--chocolate);
}

.btn-filter-pill {
    white-space: nowrap;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid var(--border-subtle);
    background: #ffffff;
    color: var(--chocolate);
    transition: all 0.22s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

.btn-filter-pill:hover {
    border-color: var(--chocolate);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(74, 53, 37, 0.12);
}

.btn-filter-pill.active {
    background: var(--chocolate) !important;
    color: #ffffff !important;
    border-color: var(--chocolate) !important;
    box-shadow: 0 4px 12px rgba(74, 53, 37, 0.25) !important;
}

.btn-filter-pill.pill-templates.active {
    background: #7c3aed !important;
    border-color: #7c3aed !important;
}

.btn-filter-pill.pill-animaux.active {
    background: #d97706 !important;
    border-color: #d97706 !important;
}

.btn-filter-pill.pill-bebe.active {
    background: #ec4899 !important;
    border-color: #ec4899 !important;
}

.btn-filter-pill.pill-patisserie.active {
    background: #2d6a4f !important;
    border-color: #2d6a4f !important;
}

.btn-filter-pill.pill-fruits.active {
    background: #e11d48 !important;
    border-color: #e11d48 !important;
}

.btn-filter-pill.pill-roses.active {
    background: #db2777 !important;
    border-color: #db2777 !important;
}

.btn-filter-pill.pill-comics.active {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

/* ========================================== */
/* UNIVERSAL FULLSCREEN 3D MODE (DESKTOP & MOBILE) */
/* ========================================== */
.cake-studio-panel.is-fullscreen-3d {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    z-index: 99999 !important;
    background: radial-gradient(circle at 50% 35%, #ffffff 0%, #e2f0e8 100%) !important;
    margin: 0 !important;
    padding: 18px !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    animation: fadeIn 0.25s ease;
}

.cake-studio-panel.is-fullscreen-3d .stage-control-bar {
    position: absolute;
    top: 16px;
    left: 18px;
    right: 18px;
    width: calc(100% - 36px);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cake-studio-panel.is-fullscreen-3d .cake-3d-stage {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 100% !important;
    flex: 1 1 auto;
}

.cake-studio-panel.is-fullscreen-3d .cake-webgl-mount {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    inset: 0;
}

.cake-studio-panel.is-fullscreen-3d .cake-webgl-mount canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.cake-studio-panel.is-fullscreen-3d .touch-hint-pill {
    position: absolute;
    bottom: 18px;
    left: 18px;
    z-index: 100;
}

.cake-studio-panel.is-fullscreen-3d .btn-generate-ai-photo {
    position: absolute;
    bottom: 18px;
    right: 18px;
    z-index: 100;
    width: auto;
}

.cake-studio-panel.is-fullscreen-3d .stage-placement-panel {
    position: absolute;
    bottom: 70px;
    left: 18px;
    max-width: 420px;
    z-index: 110;
}

/* ========================================== */
/* FULLSCREEN 3D HUD CONTROLS (STEPPER + DOCK + BAR) */
/* ========================================== */

/* Fullscreen Floating Top Stepper Bar */
.stage-fullscreen-stepper {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100% - 32px);
    z-index: 220 !important;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(212, 163, 115, 0.35);
    border-radius: 24px;
    padding: 4px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: none;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
    animation: fadeInDown 0.25s ease;
    pointer-events: auto !important;
}

.cake-studio-panel.is-fullscreen-3d .stage-fullscreen-stepper {
    display: flex !important;
}

.fs-stepper-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 2px 2px;
    scrollbar-width: none;
    flex: 1 1 auto;
}
.fs-stepper-scroll::-webkit-scrollbar {
    display: none;
}

.fs-stepper-pill {
    flex-shrink: 0;
    padding: 4px 11px;
    border-radius: 14px;
    background: #f4faf6;
    border: 1px solid rgba(74, 53, 37, 0.12);
    font-size: 11px;
    font-weight: 600;
    color: var(--chocolate);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}
.fs-stepper-pill:hover {
    background: var(--mint-bg);
}
.fs-stepper-pill.active {
    background: var(--chocolate);
    color: #ffffff;
    border-color: var(--chocolate);
    font-weight: 700;
}
.fs-stepper-pill.completed {
    background: #e1f5eb;
    color: #1e6b45;
    border-color: #a3d4b8;
}

.btn-fs-stepper-scroll {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    color: var(--chocolate);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.btn-fs-stepper-scroll:hover {
    background: var(--chocolate);
    color: #ffffff;
}

/* Fullscreen Floating Bottom Bar */
.stage-fullscreen-bottom-bar {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 780px;
    z-index: 220 !important;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(212, 163, 115, 0.4);
    border-radius: 28px;
    padding: 8px 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    animation: fadeInUp 0.25s ease;
    pointer-events: auto !important;
}

.cake-studio-panel.is-fullscreen-3d .stage-fullscreen-bottom-bar {
    display: flex !important;
}

.fs-bottom-price-info {
    display: flex;
    flex-direction: column;
}
.fs-price-step-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--chocolate-light);
    text-transform: uppercase;
}
.fs-price-amount {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--chocolate);
    line-height: 1.1;
}

.fs-bottom-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-fs-toggle-dock {
    background: #f7faf8;
    color: var(--chocolate);
    border: 1.5px solid var(--border-subtle);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.btn-fs-toggle-dock:hover {
    background: var(--mint-bg);
}
.btn-fs-toggle-dock.active {
    background: var(--chocolate);
    color: #ffffff;
    border-color: var(--chocolate);
    box-shadow: 0 4px 12px rgba(74, 53, 37, 0.25);
}

.btn-fs-nav-prev {
    background: transparent;
    color: var(--chocolate);
    border: 1.5px solid var(--chocolate);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.btn-fs-nav-prev:hover {
    background: var(--mint-light);
}

.btn-fs-nav-next {
    background: var(--chocolate);
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(74, 53, 37, 0.25);
    transition: all 0.2s ease;
}
.btn-fs-nav-next:hover {
    background: var(--chocolate-dark);
    transform: translateY(-1px);
}

.btn-fs-dock-nav {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    color: var(--chocolate);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}
.btn-fs-dock-nav:hover {
    background: var(--chocolate);
    color: #ffffff;
}

/* Fullscreen 3D Decor & Options Dock */
.stage-fullscreen-dock {
    position: absolute;
    bottom: 78px;
    left: 14px;
    right: 14px;
    max-height: 52vh;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1.5px solid rgba(212, 163, 115, 0.4);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.32);
    z-index: 180 !important;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: slideUpFade 0.3s ease;
    pointer-events: auto !important;
}

/* Floating luxury side drawer on desktop in fullscreen */
@media (min-width: 900px) {
    .cake-studio-panel.is-fullscreen-3d .stage-fullscreen-dock {
        left: auto;
        right: 24px;
        bottom: 84px;
        width: 460px;
        max-width: calc(100vw - 48px);
        max-height: calc(100vh - 165px);
        border-radius: 22px;
    }
}

.cake-studio-panel.is-fullscreen-3d .stage-fullscreen-dock.is-open {
    display: flex !important;
}

.fs-dock-header {
    padding: 10px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(253, 250, 246, 0.95), rgba(245, 237, 224, 0.95));
    flex-shrink: 0;
}

.btn-fs-dock-close {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    color: var(--chocolate);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}
.btn-fs-dock-close:hover {
    background: #fde8e8;
    color: #c0392b;
    border-color: #f5c2c7;
}

.fs-dock-body {
    padding: 14px 18px;
    overflow-y: auto;
    max-height: calc(52vh - 48px);
    scrollbar-width: thin;
}

@media (min-width: 900px) {
    .fs-dock-body {
        max-height: calc(100vh - 225px);
    }
}

@keyframes slideUpFade {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cake-studio-panel.is-fullscreen-3d #btn-toggle-fs-dock {
    display: flex !important;
}

/* ================================================= */
/* LADY VANILLA STUDIO IA / CULINARY BAKING LOADER MODAL & ANIMATION */
/* ================================================= */
#baking-loader-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(18, 14, 10, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#baking-loader-modal.active {
    display: flex;
    opacity: 1;
}

.baking-loader-card {
    background: linear-gradient(165deg, #ffffff 0%, #faf6f0 100%);
    border-radius: 24px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 163, 115, 0.28);
    max-width: 480px;
    width: 100%;
    padding: 26px 22px 20px;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: modalScaleUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.baking-loader-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2d6a4f, #d4a373, #e07a5f, #2d6a4f);
    background-size: 200% 100%;
    animation: bakingGradientSweep 2.8s linear infinite;
}

@keyframes bakingGradientSweep {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.baking-loader-header {
    margin-bottom: 12px;
}

.baking-loader-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    color: #2b1810;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.baking-loader-subtitle {
    font-size: 12px;
    color: #7d6e65;
    margin: 0;
    font-weight: 500;
}

/* BAKING ANIMATION STAGE */
.baking-scene-container {
    position: relative;
    width: 190px;
    height: 155px;
    margin: 4px auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.baking-oven-halo {
    position: absolute;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 214, 10, 0.32) 0%, rgba(224, 122, 95, 0.16) 55%, transparent 75%);
    border-radius: 50%;
    animation: haloPulse 2.2s ease-in-out infinite alternate;
}

@keyframes haloPulse {
    0% { transform: scale(0.92); opacity: 0.6; }
    100% { transform: scale(1.18); opacity: 1; }
}

.baking-pedestal {
    position: absolute;
    bottom: 12px;
    width: 124px;
    height: 10px;
    background: linear-gradient(180deg, #f0f0f0 0%, #d8d8d8 100%);
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.14);
}
.baking-pedestal::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 47px;
    width: 30px;
    height: 8px;
    background: #bbb;
    border-radius: 0 0 5px 5px;
}

.baking-cake-stack {
    position: absolute;
    bottom: 22px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    z-index: 2;
}

.baking-layer-base {
    width: 86px;
    height: 25px;
    background: var(--baking-sponge-color, linear-gradient(180deg, #f4a261, #e76f51));
    border-radius: 6px;
    position: relative;
    box-shadow: 0 3px 6px rgba(0,0,0,0.12);
    animation: layerBakeRise 2.8s ease-in-out infinite alternate;
    transition: background 0.4s ease;
}

.baking-layer-middle {
    width: 76px;
    height: 5px;
    background: #fffdf5;
    border-radius: 3px;
    margin-bottom: -1px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.baking-layer-top {
    width: 76px;
    height: 22px;
    background: var(--baking-sponge-color, linear-gradient(180deg, #f4a261, #e76f51));
    border-radius: 6px 6px 3px 3px;
    position: relative;
    animation: layerBakeRise 2.8s ease-in-out infinite alternate 0.25s;
    transition: background 0.4s ease;
}

.baking-glaze {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: var(--baking-glaze-color, #fffdf5);
    border-radius: 6px 6px 0 0;
    overflow: hidden;
    transition: background 0.4s ease;
}
.baking-glaze::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 8px;
    width: 7px;
    height: 7px;
    background: var(--baking-glaze-color, #fffdf5);
    border-radius: 50%;
    box-shadow: 16px 2px 0 1px var(--baking-glaze-color, #fffdf5), 32px -1px 0 0 var(--baking-glaze-color, #fffdf5), 48px 3px 0 2px var(--baking-glaze-color, #fffdf5);
    animation: dripWiggle 2.2s ease-in-out infinite;
}

@keyframes dripWiggle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

@keyframes layerBakeRise {
    0% { transform: scaleY(0.94); }
    100% { transform: scaleY(1.08); }
}

.baking-wand {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 24px;
    color: #d4af37;
    filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.65));
    animation: wandFloat 2.6s ease-in-out infinite;
    z-index: 5;
}

@keyframes wandFloat {
    0% { transform: translate(0, 0) rotate(0deg); }
    30% { transform: translate(-10px, 8px) rotate(-16deg); }
    70% { transform: translate(8px, -4px) rotate(14deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.baking-steam-wrap {
    position: absolute;
    top: 16px;
    display: flex;
    gap: 12px;
    z-index: 3;
}
.baking-steam {
    font-size: 18px;
    color: rgba(212, 163, 115, 0.55);
    animation: steamRise 2.1s ease-out infinite;
}
.baking-steam:nth-child(2) { animation-delay: 0.7s; }
.baking-steam:nth-child(3) { animation-delay: 1.3s; }

@keyframes steamRise {
    0% { opacity: 0; transform: translateY(8px) scale(0.7); }
    50% { opacity: 0.85; }
    100% { opacity: 0; transform: translateY(-22px) scale(1.35); }
}

.baking-sparkle {
    position: absolute;
    font-size: 15px;
    animation: sparkleTwinkle 2s infinite ease-in-out;
}
.sparkle-1 { top: 22px; left: 18px; animation-delay: 0.15s; }
.sparkle-2 { top: 58px; right: 12px; animation-delay: 0.75s; }
.sparkle-3 { bottom: 38px; left: 8px; animation-delay: 1.35s; }

@keyframes sparkleTwinkle {
    0%, 100% { opacity: 0.15; transform: scale(0.6); }
    50% { opacity: 1; transform: scale(1.25); }
}

/* PROGRESS BAR AREA */
.baking-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.baking-progress-stage {
    font-weight: 700;
    font-size: 13px;
    color: #2b1810;
    text-align: left;
}

.baking-progress-percent {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 19px;
    color: #2d6a4f;
    min-width: 48px;
    text-align: right;
}

.baking-progress-bar-wrap {
    background: #e9ecef;
    border-radius: 12px;
    height: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
    margin: 6px 0 10px;
}

.baking-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2d6a4f, #d4a373, #e07a5f);
    border-radius: 12px;
    position: relative;
    transition: width 0.35s ease;
}

.baking-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
    animation: barShine 1.8s infinite;
}

@keyframes barShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.baking-progress-subtext {
    font-size: 11.5px;
    color: #8c786a;
    margin: 0 0 14px;
    min-height: 17px;
    line-height: 1.35;
}

/* 4 STEPS TIMELINE PILLS */
.baking-steps-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}

.baking-step-col {
    background: #f7f4ee;
    border: 1px solid #e8dfd3;
    border-radius: 10px;
    padding: 7px 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: all 0.3s ease;
}

.baking-step-col.active {
    background: #f0f8f4;
    border-color: #2d6a4f;
    box-shadow: 0 2px 8px rgba(45, 106, 79, 0.18);
    transform: translateY(-2px);
}

.baking-step-col.completed {
    background: #eef7f0;
    border-color: #52b788;
}

.baking-step-icon {
    font-size: 15px;
}

.baking-step-label {
    font-size: 10px;
    font-weight: 600;
    color: #6c584c;
    white-space: nowrap;
}

.baking-step-col.active .baking-step-label {
    color: #2d6a4f;
    font-weight: 700;
}

.baking-step-col.completed .baking-step-label {
    color: #2d6a4f;
}

/* FOOTER CALLOUT & STUDIO IA INFO */
.baking-luxury-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #edf6f9;
    color: #0077b6;
    border: 1px solid #caf0f8;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.baking-live-dot {
    width: 7px;
    height: 7px;
    background: #00b4d8;
    border-radius: 50%;
    animation: livePulse 1.2s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.35); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.baking-tip-box {
    background: #fffbeb;
    border: 1px dashed #fcd34d;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 11px;
    color: #92400e;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1.35;
}

.btn-baking-cancel {
    background: transparent;
    border: none;
    color: #a09289;
    font-size: 11px;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 8px;
    padding: 3px 6px;
}
.btn-baking-cancel:hover {
    color: #4a3525;
}

/* ========================================================
   GUEST VS LOGIN CHOICE MODAL & LOYALTY POINTS REDEMPTION
   ======================================================== */
.checkout-choice-card {
    max-width: 580px;
    width: 92%;
    border-radius: 22px;
}

.checkout-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 600px) {
    .checkout-choice-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.choice-action-card {
    position: relative;
    border: 1.5px solid var(--border-subtle);
    border-radius: 16px;
    padding: 18px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    background: #fff;
    box-sizing: border-box;
}

.choice-action-card:hover {
    transform: translateY(-3px);
}

.choice-action-card.member-card {
    border-color: #fed7aa;
    background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
}
.choice-action-card.member-card:hover {
    border-color: #ea580c;
    box-shadow: 0 10px 24px rgba(234, 88, 12, 0.16);
}

.choice-action-card.guest-card {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #f7fdf9 0%, #ffffff 100%);
}
.choice-action-card.guest-card:hover {
    border-color: #16a34a;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.16);
}

.choice-badge-star {
    position: absolute;
    top: -9px;
    right: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.choice-badge-express {
    position: absolute;
    top: -9px;
    right: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.choice-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 16px;
}

.choice-action-card h4 {
    margin: 0 0 4px 0;
    font-size: 14.5px;
    color: var(--chocolate);
    font-weight: 700;
}

.choice-action-card p {
    font-size: 11.5px;
    color: #666;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.choice-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 14px 0;
    font-size: 11px;
    color: #555;
    flex: 1;
}

.choice-benefits li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.choice-benefits li i {
    color: #16a34a;
    font-size: 9.5px;
}

.btn-choice-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--chocolate) 0%, #301f16 100%);
    color: #fff;
    border: none;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(74, 53, 37, 0.2);
}
.btn-choice-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(74, 53, 37, 0.3);
}

.btn-choice-secondary {
    width: 100%;
    background: #f0fdf4;
    color: #166534;
    border: 1.5px solid #86efac;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.btn-choice-secondary:hover {
    background: #dcfce7;
    border-color: #4ade80;
}

.btn-text-back {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}
.btn-text-back:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--chocolate);
}

/* Loyalty Points Redemption Box in Checkout */
.checkout-loyalty-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fde68a;
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 14px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.08);
}

.loyalty-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.loyalty-coin-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.loyalty-badge-vip {
    background: #d97706;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.loyalty-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.loyalty-checkbox-label input {
    width: 17px;
    height: 17px;
    accent-color: #d97706;
    cursor: pointer;
}

