/* =========================================
   PEDIDO PAGE - HOLO CREATIVE CHECKOUT
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Satoshi:wght@500;700;900&display=swap');

:root {
    --color-grape: #3e86c6;
    --color-purple: #a666aa;
    --color-pink: #ec4492;
    --color-red: #ee4454;
    --color-orange: #f05427;
    --bg-page: #fbfbfb;
    --bg-alt: #f5f5f7;
    --bg-card: #ffffff;
    --text-main: #1d1d1f;
    --text-sec: #6e6e73;
    --border: #e6e6e7;
    --success: #55d154;
    --gradient-brand: linear-gradient(90deg, #3e86c6 0%, #a666aa 24%, #ec4492 51%, #ee4454 74%, #f05427 100%);
    --gradient-brand-hover: linear-gradient(104deg, #3e86c6, #a666aa, #ec4492, #ee4454, #f05427);
    --font-heading: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-pill: 100px;
    --radius-card: 24px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --glow-text: 0 0 20px rgba(236, 68, 146, 0.5);
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Instagram Section */
.bg-darker {
    background: #050505;
    /* Slightly darker than main bg */
}

.instagram-container {
    min-height: 400px;
    background: var(--bg-card);
    display: flex;
    justify-content: center;
    align-items: center;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.insta-post {
    position: relative;
    aspect-ratio: 1/1;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.insta-post:nth-child(2) {
    background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 100%);
}

.insta-post:nth-child(3) {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.insta-post:nth-child(4) {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.insta-post:hover {
    transform: translateY(-5px);
}

.insta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.insta-overlay svg {
    margin-bottom: 8px;
}

.insta-post:hover .insta-overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* =========================================
   FLOATING ORBS BACKGROUND
   ========================================= */
.bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--color-pink);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--color-grape);
    bottom: 10%;
    left: -80px;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--color-purple);
    top: 40%;
    right: 10%;
    animation-delay: -10s;
}

.orb-4 {
    width: 200px;
    height: 200px;
    background: var(--color-orange);
    bottom: -50px;
    right: 30%;
    animation-delay: -15s;
}

.orb-5 {
    width: 350px;
    height: 350px;
    background: var(--color-red);
    top: 20%;
    left: 20%;
    animation-delay: -8s;
    opacity: 0.06;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(15px, 30px) scale(1.02);
    }
}

/* =========================================
   CONTAINER & UTILITIES
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-glow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(251, 251, 251, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-sec);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-back:hover {
    color: var(--text-main);
    transform: translateX(-2px);
    box-shadow: var(--shadow-card);
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-img {
    height: 58px;
    width: auto;
    object-fit: contain;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}


/* Step indicator */
.nav-steps-indicator {
    display: flex;
    align-items: center;
    gap: 0;
}

.step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

.dot-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    background: var(--bg-alt);
    color: var(--text-sec);
    border: 2px solid var(--border);
    transition: all 0.4s var(--ease-elastic);
}

.step-dot.active .dot-number {
    background: var(--gradient-brand);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(236, 68, 146, 0.3);
}

.step-dot.completed .dot-number {
    background: var(--success);
    color: white;
    border-color: transparent;
}

.dot-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-sec);
    transition: color 0.3s ease;
}

.step-dot.active .dot-label {
    color: var(--text-main);
}

.step-connector {
    width: 40px;
    height: 2px;
    background: var(--border);
    margin: 0 8px;
    margin-bottom: 18px;
    transition: background 0.5s ease;
}

.step-connector.active {
    background: var(--gradient-brand);
}

/* =========================================
   CHECKOUT STEPS
   ========================================= */
.checkout-main {
    padding-top: 100px;
    min-height: 100vh;
}

.checkout-step {
    display: none;
    animation: stepFadeIn 0.6s var(--ease-out) forwards;
}

.checkout-step.active {
    display: block;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.step-header {
    text-align: center;
    margin-bottom: 60px;
}

.checkout-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 900;
    margin-top: 16px;
    letter-spacing: -0.03em;
}

.checkout-subtitle {
    font-size: 1.15rem;
    color: var(--text-sec);
    margin-top: 12px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   STEP 1: DESIGNER LAYOUT
   ========================================= */
.designer-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Preview Panel */
.preview-panel {
    position: sticky;
    top: 120px;
}

.preview-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
    transition: all 0.5s var(--ease-out);
}

.preview-card:hover {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.preview-label {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Orientation Toggle */
.orientation-toggle {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 16px;
    margin-top: 8px;
}

.orient-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    background: white;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-sec);
    transition: all 0.3s var(--ease-elastic);
}

.orient-btn:hover {
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-main);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.orient-btn.active {
    background: var(--gradient-brand);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 16px rgba(236, 68, 146, 0.25);
}

.orient-btn.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(236, 68, 146, 0.35);
}

.orient-btn svg {
    flex-shrink: 0;
}

/* 2D Canvas Garland Viewer */
#garland-canvas-container {
    width: 100%;
    min-height: 350px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.6) 0%, rgba(245, 245, 247, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: min-height 0.4s var(--ease-out);
}

/* Vertical orientation: taller canvas */
#garland-canvas-container.orient-vertical {
    min-height: 350px;
}

/* Horizontal orientation: wider, shorter canvas */
#garland-canvas-container.orient-horizontal {
    min-height: 200px;
}

#garland-canvas {
    width: 100%;
    max-height: 450px;
    display: block;
    border-radius: 16px;
    object-fit: contain;
    transition: max-height 0.4s var(--ease-out);
}

#garland-canvas-container.orient-horizontal #garland-canvas {
    max-height: 320px;
}

.canvas-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 5;
    pointer-events: none;
}

.canvas-loading.hidden {
    display: none;
}

.preview-size-badge {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: white;
    border: 2px solid transparent;
    background-image: linear-gradient(white, white), var(--gradient-brand);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-radius: var(--radius-pill);
    padding: 6px 16px;
    font-weight: 800;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    color: var(--text-main);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.4s var(--ease-elastic);
}

/* Sparkle ring animation */
.sparkle-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    height: 90%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: sparkleRotate 30s linear infinite;
}

@keyframes sparkleRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-pink);
    opacity: 0;
    animation: sparklePulse 3s ease-in-out infinite;
}

.s1 {
    top: 0;
    left: 50%;
    animation-delay: 0s;
    background: var(--color-grape);
}

.s2 {
    top: 25%;
    right: 0;
    animation-delay: 0.5s;
    background: var(--color-purple);
}

.s3 {
    bottom: 25%;
    right: 5%;
    animation-delay: 1s;
    background: var(--color-pink);
}

.s4 {
    bottom: 0;
    left: 50%;
    animation-delay: 1.5s;
    background: var(--color-red);
}

.s5 {
    bottom: 25%;
    left: 0;
    animation-delay: 2s;
    background: var(--color-orange);
}

.s6 {
    top: 25%;
    left: 5%;
    animation-delay: 2.5s;
    background: var(--color-grape);
}

@keyframes sparklePulse {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.5);
    }
}

/* Loading State */
.model-loading,
.canvas-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 5;
    pointer-events: none;
}

.model-loading-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--color-pink);
    animation: spinLoader 0.8s linear infinite;
}

.model-loading-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.model-loading.hidden,
.canvas-loading.hidden {
    display: none;
}

/* Palette Reference */
.palette-reference {
    margin-top: 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s var(--ease-out);
}

.palette-reference:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.palette-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.palette-icon {
    font-size: 1.2rem;
}

.palette-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.palette-image-wrapper {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.palette-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s var(--ease-out);
}

.palette-image-wrapper:hover .palette-img {
    transform: scale(1.02);
}

.palette-hint {
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--text-sec);
    text-align: center;
    font-weight: 500;
    font-style: italic;
}

/* Live Price */
.live-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 16px 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.price-label {
    font-size: 0.9rem;
    color: var(--text-sec);
    font-weight: 500;
}

.price-value {
    font-size: 1.8rem;
    font-weight: 900;
    font-family: var(--font-heading);
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s var(--ease-elastic);
}

.price-value.bump {
    animation: priceBump 0.4s var(--ease-elastic);
}

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

    50% {
        transform: scale(1.15);
    }

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

/* =========================================
   CONTROLS PANEL
   ========================================= */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.control-group {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.control-group:hover {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.control-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
}

.control-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-alt);
}

.control-hint {
    font-size: 0.8rem;
    color: var(--text-sec);
    font-weight: 400;
}

/* Section Color Pickers */
.section-color-picker {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 8px;
    background: white;
    transition: box-shadow 0.3s ease;
}

.section-color-picker.open {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-picker-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.section-picker-header:hover {
    background: var(--bg-alt);
}

.section-color-preview {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: background 0.3s ease, transform 0.3s var(--ease-elastic);
}

.section-color-picker.open .section-color-preview {
    transform: scale(1.1);
}

.section-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.section-color-name {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--text-sec);
    font-weight: 500;
}

.section-chevron {
    flex-shrink: 0;
    color: var(--text-sec);
    transition: transform 0.3s ease;
}

.section-color-picker.open .section-chevron {
    transform: rotate(180deg);
}

.section-palette {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 0 16px 16px;
    max-height: 800px;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
    opacity: 1;
}

.section-palette.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.palette-swatch {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s var(--ease-elastic);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.palette-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.palette-swatch.active {
    border-color: var(--text-main);
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(29, 29, 31, 0.1), 0 4px 16px rgba(0, 0, 0, 0.15);
}

.palette-swatch.active::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid white;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* === Color no disponible (stock < 45) === */
.palette-swatch-wrap.palette-swatch-unavailable .palette-swatch {
    cursor: not-allowed;
    opacity: 0.55;
    filter: grayscale(0.55);
    box-shadow: none;
}

.palette-swatch-wrap.palette-swatch-unavailable .palette-swatch:hover {
    transform: none;
    box-shadow: none;
}

.palette-swatch-wrap.palette-swatch-unavailable .palette-swatch::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-image: linear-gradient(135deg, transparent calc(50% - 1.5px), rgba(0, 0, 0, 0.45) calc(50% - 1.5px), rgba(0, 0, 0, 0.45) calc(50% + 1.5px), transparent calc(50% + 1.5px));
    pointer-events: none;
}

.swatch-unavailable-overlay {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 38, 38, 0.92);
    color: white;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 6px;
    border-radius: 8px;
    pointer-events: none;
    white-space: nowrap;
}

.selected-dot:hover::after {
    opacity: 1;
}

/* Extra cluster color pickers (clusters 4+) */
.extra-cluster-colors {
    display: flex;
    gap: 8px;
    padding: 12px 8px;
}

.extra-color-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    border: 2px solid #e5e5e5;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    color: var(--text-main);
}

.extra-color-option:hover {
    border-color: #ccc;
    transform: scale(1.03);
}

.extra-color-option.active {
    border-color: var(--text-main);
    background: #f5f5f7;
    font-weight: 600;
}

.extra-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

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

    60% {
        transform: scale(1.3);
    }

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

/* =========================================
   SIZE SELECTOR (LINEAR BAR)
   ========================================= */
.size-bar-visual {
    margin-bottom: 20px;
    position: relative;
}

.size-bar-track {
    position: relative;
    height: 8px;
    background: var(--border);
    border-radius: 100px;
    margin: 0 8px;
}

.size-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 100px;
    background: var(--gradient-brand);
    width: 0%;
    /* default 1.5m = start of the bar */
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.size-bar-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--color-pink);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.handle-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.handle-label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-main);
}

.size-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-sec);
}

/* Size bar spacing */

.size-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: white;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #333;
}

.qty-btn:hover {
    border-color: var(--accent, #ff4d6d);
    color: var(--accent, #ff4d6d);
    transform: scale(1.1);
}

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

.qty-value {
    font-size: 28px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    color: #1a1a1a;
}

.size-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 18px 8px 14px;
    min-height: 142px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s var(--ease-elastic);
    position: relative;
    overflow: hidden;
}

.size-best {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    padding: 4px 7px;
    border-radius: 8px;
    background: var(--gradient-brand);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
}

.size-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.size-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.size-btn.active {
    border-color: transparent;
    background: linear-gradient(white, white) padding-box, var(--gradient-brand) border-box;
    box-shadow: 0 8px 24px rgba(236, 68, 146, 0.15);
    transform: translateY(-3px);
}

.size-val {
    font-size: 1.3rem;
    font-weight: 900;
    font-family: var(--font-heading);
    position: relative;
    z-index: 1;
}

.size-btn.active .size-val {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.size-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-sec);
    position: relative;
    z-index: 1;
}

.size-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    padding: 2px 8px;
    background: var(--bg-alt);
    border-radius: var(--radius-pill);
}

.size-btn.active .size-label {
    background: var(--gradient-brand);
    color: white;
}

/* =========================================
   OCCASION GRID
   ========================================= */
.occasion-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.occasion-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s var(--ease-elastic);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

.occasion-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

.occasion-card.selected {
    border-color: transparent;
    background: linear-gradient(white, white) padding-box, var(--gradient-brand) border-box;
    box-shadow: 0 8px 24px rgba(236, 68, 146, 0.15);
    transform: translateY(-3px);
}

.occasion-emoji {
    font-size: 1.8rem;
    transition: transform 0.3s var(--ease-elastic);
}

.occasion-card:hover .occasion-emoji,
.occasion-card.selected .occasion-emoji {
    transform: scale(1.2) rotate(-5deg);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s var(--ease-elastic);
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-next {
    background: linear-gradient(white, white) padding-box, var(--gradient-brand) border-box;
    border: 2px solid transparent;
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(236, 68, 146, 0.15);
}

.btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-back {
    background: white;
    border: 1.5px solid var(--border);
    color: var(--text-sec);
    padding: 12px 24px;
}

.btn-back:hover {
    color: var(--text-main);
    border-color: var(--text-main);
    transform: translateX(-3px);
}

.btn-pay {
    position: relative;
    background: var(--gradient-brand);
    color: white;
    padding: 18px 48px;
    font-size: 1.15rem;
    border: none;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(236, 68, 146, 0.3);
}

.btn-pay:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(236, 68, 146, 0.4);
}

.btn-pay-icon {
    display: flex;
    align-items: center;
}

.btn-pulse {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-pill);
    border: 2px solid rgba(255, 255, 255, 0.4);
    animation: btnPulse 2s ease-out infinite;
    pointer-events: none;
}

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

    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

/* =========================================
   STEP 2: FORM LAYOUT
   ========================================= */
.form-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 40px;
    align-items: start;
}

.form-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.form-section {
    margin-bottom: 32px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-sec);
    margin-bottom: 12px;
}

.form-row {
    margin-bottom: 16px;
}

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

.form-field {
    position: relative;
}

.form-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-sec);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 2px solid var(--border);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text-main);
    background: transparent;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-field textarea {
    resize: vertical;
    min-height: 60px;
}

.form-field input:focus,
.form-field textarea:focus {
    border-bottom-color: var(--color-pink);
}

.field-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-brand);
    transition: width 0.4s var(--ease-out);
}

.form-field input:focus~.field-line,
.form-field textarea:focus~.field-line {
    width: 100%;
}

/* Required star */
.required-star {
    color: #ee4454;
    font-weight: 700;
}

/* Field hints & errors */
.field-hint {
    display: block;
    font-size: 0.72rem;
    color: var(--text-sec);
    margin-top: 4px;
    opacity: 0.7;
}

.field-error {
    display: none;
    font-size: 0.75rem;
    color: #ee4454;
    margin-top: 4px;
    font-weight: 500;
}

.field-error.visible {
    display: block;
}

/* Phone prefix selector */
.phone-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-prefix-select {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 8px;
    min-width: 75px;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
}

.phone-prefix-select:focus {
    outline: none;
    border-color: var(--color-grape);
}

.phone-input-group input {
    flex: 1;
}

/* Validation states */
.form-field.field-valid input,
.form-field.field-valid textarea {
    border-bottom-color: var(--success) !important;
}

.form-field.field-invalid input,
.form-field.field-invalid textarea {
    border-bottom-color: #ee4454 !important;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    gap: 16px;
}

/* Mini Summary */
.mini-summary {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mini-summary-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.mini-summary-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-preview {
    position: relative;
    margin-bottom: 16px;
    background: var(--bg-alt);
    border-radius: 16px;
    overflow: hidden;
}

#mini-garland-canvas {
    width: 100%;
    max-height: 160px;
    display: block;
    border-radius: 12px;
    object-fit: contain;
}

.mini-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.mini-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.mini-detail-row .label {
    color: var(--text-sec);
}

.mini-detail-row .value {
    font-weight: 600;
}

.mini-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-weight: 700;
}

.mini-price {
    font-size: 1.5rem;
    font-weight: 900;
    font-family: var(--font-heading);
}

/* Trust badges */
.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-sec);
}

/* =========================================
   STEP 3: CONFIRM LAYOUT
   ========================================= */
.confirm-layout {
    max-width: 700px;
    margin: 0 auto;
}

.order-summary-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

.summary-visual {
    position: relative;
    background: var(--bg-alt);
    padding: 32px;
    text-align: center;
    overflow: hidden;
}

#summary-garland-canvas {
    width: 100%;
    max-width: 350px;
    max-height: 250px;
    margin: 0 auto;
    display: block;
    border-radius: 16px;
    object-fit: contain;
}

.mini-preview.exclusive-3d-preview,
.summary-visual.exclusive-3d-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at center, rgba(200, 39, 138, 0.16) 0%, rgba(200, 39, 138, 0.07) 34%, transparent 68%),
        linear-gradient(180deg, #fff 0%, #fff7fb 100%);
}

.mini-preview.exclusive-3d-preview {
    min-height: 300px;
}

.summary-visual.exclusive-3d-preview {
    min-height: 390px;
}

.mini-preview.exclusive-3d-preview::after,
.summary-visual.exclusive-3d-preview::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 15%;
    width: min(58%, 260px);
    height: 28px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(ellipse at center, rgba(28, 18, 24, 0.22) 0%, rgba(28, 18, 24, 0.08) 42%, transparent 72%);
    filter: blur(8px);
    animation: exclusiveShadowFloat 4.8s ease-in-out infinite;
    pointer-events: none;
}

#mini-product-img.exclusive-3d-garland,
#summary-product-img.exclusive-3d-garland {
    position: relative;
    z-index: 1;
    width: 100% !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    filter: drop-shadow(0 28px 34px rgba(200, 39, 138, 0.22));
    animation: exclusiveGarlandFloat 4.8s ease-in-out infinite;
}

#mini-product-img.exclusive-3d-garland {
    max-height: 310px !important;
    padding: 0 16px 42px;
}

#summary-product-img.exclusive-3d-garland {
    max-height: 430px !important;
    padding: 0 24px 50px;
}

@keyframes exclusiveGarlandFloat {
    0%, 100% {
        transform: translateY(28px) rotateY(-7deg) rotateZ(-1deg) scale(1.28);
    }
    50% {
        transform: translateY(14px) rotateY(7deg) rotateZ(1deg) scale(1.34);
    }
}

@keyframes exclusiveShadowFloat {
    0%, 100% {
        opacity: 0.75;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.45;
        transform: translateX(-50%) scale(0.84);
    }
}

.summary-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiFall 3s ease-in-out infinite;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateY(300px) rotate(720deg);
        opacity: 0;
    }
}

.summary-body {
    padding: 32px;
}

.summary-section {
    margin-bottom: 24px;
}

.summary-section h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-sec);
    margin-bottom: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.sum-label {
    font-size: 0.9rem;
    color: var(--text-sec);
}

.sum-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.kit-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kit-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-main);
}

/* Total area */
.summary-total {
    padding: 20px 0 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.95rem;
    color: var(--text-sec);
}

.total-row.final {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-main);
    padding-top: 12px;
    border-top: 2px solid var(--border);
    margin-top: 8px;
}

.total-row.final .gradient-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.free-badge {
    background: rgba(85, 209, 84, 0.1);
    color: var(--success);
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.8rem;
}

.confirm-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-top: 1px solid var(--border);
    gap: 16px;
}

.payment-confidence {
    margin: 0 32px 0;
    padding: 16px 18px;
    border-top: 1px solid var(--border);
    background: #fbfdff;
    color: var(--text-sec);
    line-height: 1.6;
    font-size: 0.94rem;
}

.payment-confidence strong {
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}

.payment-message {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-weight: 700;
}

/* =========================================
   SUCCESS SCREEN
   ========================================= */
.success-content {
    text-align: center;
    padding: 80px 0;
    position: relative;
}

.success-icon-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
}

.success-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--success);
    animation: successRing 0.8s var(--ease-elastic) 0.2s both;
    opacity: 0;
}

@keyframes successRing {
    0% {
        transform: scale(0);
        opacity: 0;
    }

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

.success-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successCheck 0.5s var(--ease-elastic) 0.5s both;
    opacity: 0;
}

@keyframes successCheck {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.check-path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: drawCheck 0.6s ease-out 0.8s forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.success-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 16px;
    animation: fadeInUp 0.5s var(--ease-out) 0.8s both;
}

.success-subtitle {
    font-size: 1.1rem;
    color: var(--text-sec);
    max-width: 450px;
    margin: 0 auto 24px;
    animation: fadeInUp 0.5s var(--ease-out) 1s both;
}

.success-order-id {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 40px;
    animation: fadeInUp 0.5s var(--ease-out) 1.2s both;
}

.success-actions {
    animation: fadeInUp 0.5s var(--ease-out) 1.4s both;
}

.success-actions .btn-next {
    width: auto;
    display: inline-flex;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Celebration Balloons */
.celebration-balloons {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.celebration-balloon {
    position: absolute;
    bottom: -80px;
    width: 40px;
    height: 50px;
    border-radius: 50% 50% 50% 50%;
    animation: balloonFloat 4s ease-out forwards;
    opacity: 0;
}

.celebration-balloon::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 1px;
    height: 20px;
    background: rgba(0, 0, 0, 0.15);
    transform: translateX(-50%);
}

@keyframes balloonFloat {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.5);
        opacity: 0;
    }

    10% {
        opacity: 0.9;
        transform: scale(1);
    }

    100% {
        transform: translateY(-110vh) rotate(20deg);
        opacity: 0;
    }
}

.whatsapp-help-card {
    --wa-accent: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 60px;
    padding: 0 24px;
    margin-top: 12px;
    border-radius: var(--radius-pill);
    background: linear-gradient(white, white) padding-box, linear-gradient(90deg, #25d366 0%, #6c63ff 50%, #ff5c61 100%) border-box;
    border: 2px solid transparent;
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.12);
    color: var(--text-main) !important;
    text-decoration: none !important;
    font-family: var(--font-body);
    font-weight: 700;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.whatsapp-help-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(37, 211, 102, 0.16);
}

.whatsapp-help-card:visited,
.whatsapp-help-card:active,
.whatsapp-help-card:focus,
.whatsapp-help-card:link {
    color: var(--text-main) !important;
    text-decoration: none !important;
    outline: none;
}

.whatsapp-help-card * {
    color: inherit !important;
    text-decoration: none !important;
}

.whatsapp-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--wa-accent);
    color: #ffffff !important;
    flex-shrink: 0;
    box-shadow: 0 14px 24px -18px rgba(37, 211, 102, 0.95);
}

.whatsapp-help-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
    text-align: center;
}

.whatsapp-help-label {
    font-size: 0.9rem;
    font-weight: 800;
    color: #128c4a !important;
}

.whatsapp-help-copy strong {
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--text-main) !important;
}

.whatsapp-help-copy small {
    display: none;
}

.whatsapp-help-arrow {
    font-size: 1.08rem;
    color: #128c4a !important;
    flex-shrink: 0;
    font-weight: 800;
}

/* =========================================
   RESPONSIVE
   ========================================= */
/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .designer-layout {
        display: flex;
        /* Changed from grid to flex column for better centering */
        flex-direction: column;
        gap: 32px;
        align-items: center;
        /* Center everything */
    }

    .preview-panel {
        position: static;
        width: 100%;
        max-width: 600px;
        /* Limit width on tablet/mobile */
    }

    .controls-panel {
        width: 100%;
        max-width: 600px;
    }

    .form-layout {
        grid-template-columns: 1fr;
    }

    .mini-summary {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-right {
        order: 3;
        width: 100%;
        justify-content: center;
        align-items: center;
        gap: 10px;
        margin-top: 4px;
    }

    .nav-steps-indicator {
        width: auto;
        justify-content: center;
        margin-top: 0;
        gap: 8px;
        /* Tighter gap */
    }

    .dot-label {
        display: none;
    }

    /* Hide labels on mobile to save space */

    .step-connector {
        width: 16px;
        margin: 0 4px;
    }

    .checkout-main {
        padding-top: 140px;
        /* More space for wrapped navbar */
    }

    .container {
        padding: 0 16px;
    }

    .step-header {
        margin-bottom: 30px;
    }

    .checkout-title {
        font-size: 2rem;
    }

    .section-palette {
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
    }

    .size-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .occasion-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .whatsapp-help-card {
        min-height: 58px;
        padding: 0 16px;
        gap: 10px;
        border-radius: 999px;
    }

    .whatsapp-help-icon {
        width: 34px;
        height: 34px;
    }

    .whatsapp-help-copy {
        justify-content: center;
        gap: 6px;
    }

    .whatsapp-help-label {
        font-size: 0.8rem;
    }

    .whatsapp-help-copy strong {
        font-size: 0.94rem;
    }

    .whatsapp-help-arrow {
        display: none;
    }

    .form-row.two-cols {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 24px;
    }

    .confirm-actions {
        flex-direction: column;
    }

    .btn-pay {
        width: 100%;
    }

    .btn-back {
        width: 100%;
        justify-content: center;
    }

    .preview-card {
        padding: 16px;
        border-radius: 24px;
    }

    #garland-canvas-container {
        min-height: 280px;
    }

    #garland-canvas-container.orient-horizontal {
        min-height: 180px;
    }

    .orientation-toggle {
        gap: 4px;
    }

    .orient-btn {
        padding: 6px 14px;
        font-size: 0.78rem;
    }

    .control-group {
        padding: 20px;
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .section-palette {
        grid-template-columns: repeat(5, 1fr);
    }

    .occasion-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    #garland-canvas-container {
        min-height: 240px;
    }

    #garland-canvas-container.orient-horizontal {
        min-height: 150px;
    }

    .orient-btn span {
        display: none;
    }

    .orient-btn {
        padding: 8px 12px;
    }
}

/* =========================================
   KIT CONTENTS REDESIGN STYLES
   ========================================= */
.kit-category {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.category-icon {
    font-size: 1.5rem;
}

.category-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.kit-visual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.kit-item-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
    position: relative;
}

.kit-item-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-pink);
    box-shadow: 0 16px 40px rgba(236, 68, 146, 0.12);
}

.kit-item-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity 0.3s;
}

.kit-item-card:hover::after {
    opacity: 1;
}

.kit-item-img-wrap {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #faf5f8 0%, #f0e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.kit-item-img-wrap::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(236, 68, 146, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.kit-item-img-wrap img {
    max-width: 180px;
    max-height: 180px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
    transition: transform 0.4s var(--ease-out);
}

.kit-item-card:hover .kit-item-img-wrap img {
    transform: scale(1.08);
}

.kit-item-img-wrap.garland-bg {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.kit-item-img-wrap.garland-bg img {
    max-width: 200px;
    max-height: 200px;
    filter: drop-shadow(0 4px 20px rgba(255, 255, 255, 0.15));
}

/* Images with their own background (globos 260, ganchos adhesivos) */
.kit-item-img-wrap.kit-img-with-bg {
    padding: 0;
    background: transparent;
}

.kit-item-img-wrap.kit-img-with-bg::before {
    display: none;
}

.kit-item-img-wrap.kit-img-with-bg img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    filter: none;
}

.kit-item-info {
    padding: 20px;
}

.kit-item-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.kit-item-info p {
    font-size: 0.82rem;
    color: var(--text-sec);
    margin: 0;
    line-height: 1.5;
}

.kit-item-info .kit-item-extra {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--color-pink);
    font-style: italic;
}

.kit-item-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, rgba(236, 68, 146, 0.1), rgba(160, 102, 170, 0.1));
    color: var(--color-pink);
}

/* Extra color picker animation */
.extra-color-picker {
    animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

@media (max-width: 768px) {
    .kit-visual-grid {
        grid-template-columns: 1fr;
    }

    .kit-category {
        padding: 20px;
    }

    .kit-item-img-wrap {
        height: 180px;
    }

    .kit-item-img-wrap img {
        max-width: 140px;
        max-height: 140px;
    }
}

/* ══════════════════════════════════════════════════════════════
   Autocompletado de dirección con Google Maps / OpenStreetMap
   ══════════════════════════════════════════════════════════════ */
.address-field-wrap { position: relative; }

.dcg-address-suggestions {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    display: none;
    max-height: 280px;
    overflow-y: auto;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 4px);
    z-index: 40;
}
.dcg-address-suggestions.open { display: block; }

.dcg-address-suggestion {
    display: grid;
    grid-template-columns: 24px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.92rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background .12s;
}
.dcg-address-suggestion:last-child { border-bottom: none; }
.dcg-address-suggestion:hover,
.dcg-address-suggestion.hl { background: #f9fafb; }

.dcg-sug-pin  { grid-row: 1 / span 2; align-self: center; font-size: 1.05rem; }
.dcg-sug-main { grid-column: 2; font-weight: 600; color: #111827; }
.dcg-sug-sub  { grid-column: 2; font-size: 0.78rem; color: #6b7280; }

.address-validated {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #047857;
    background: #ecfdf5;
    padding: 4px 10px;
    border-radius: 999px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Asegura que el atributo `hidden` siempre oculte el chip, incluso cuando
   el selector .address-validated (con display:inline-flex) sería más
   específico que el default `[hidden] { display: none }` del browser. */
.address-validated[hidden] {
    display: none !important;
}

/* ══════════════════════════════════════════════════════════════
   Google Places Autocomplete dropdown (.pac-container)
   ══════════════════════════════════════════════════════════════ */
.pac-container {
    border-radius: 14px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12) !important;
    margin-top: 6px !important;
    font-family: inherit !important;
    background: #fff !important;
    overflow: hidden;
    z-index: 9999 !important;
}
.pac-container:after { display: none !important; }  /* ocultar el logo "powered by Google" redundante */
.pac-item {
    padding: 10px 14px !important;
    border-top: 1px solid #f3f4f6 !important;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #374151 !important;
}
.pac-item:first-child { border-top: none !important; }
.pac-item:hover,
.pac-item-selected {
    background: #fdf2f8 !important;
}
.pac-icon { display: none !important; }
.pac-item-query {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #111827 !important;
    padding-right: 6px;
}
.pac-matched { color: #ec4899 !important; font-weight: 700; }
.pac-item > span:not(.pac-item-query) {
    color: #6b7280 !important;
    font-size: 0.8rem !important;
}
