/* ============================================================
   CONFIGURATOR V4 — Premium Redesign
   ============================================================ */

:root {
    --v4-bg: #0a0a0f;
    --v4-surface: rgba(255, 255, 255, 0.03);
    --v4-card-bg: rgba(255, 255, 255, 0.04);
    --v4-card-hover: rgba(255, 255, 255, 0.08);
    --v4-border: rgba(255, 255, 255, 0.08);
    --v4-border-hover: rgba(255, 255, 255, 0.15);
    --v4-accent: var(--gold, #d5a45b);
    --v4-accent-soft: rgba(213, 164, 91, 0.15);
    --v4-accent-glow: rgba(213, 164, 91, 0.25);
    --v4-accent-strong: rgba(213, 164, 91, 0.5);
    --v4-text: #f0ece4;
    --v4-text-muted: #8a8680;
    --v4-radius: 16px;
    --v4-radius-lg: 24px;
}

/* --- Body --- */
body.configurator-v4-body {
    background: var(--v4-bg);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(213, 164, 91, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(213, 164, 91, 0.03) 0%, transparent 50%);
    color: var(--v4-text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding-top: var(--header-h);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================================
   BOTTOM STATUS BAR
   ============================================================ */
.v4-status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-top: 1px solid var(--v4-border);
    padding: 0 40px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.v4-status-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
}

.v4-status-center {
    display: flex;
    justify-content: center;
}

.v4-status-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    min-width: 280px;
}

/* Progress bar */
.v4-progress-container {
    height: 4px;
    background: var(--v4-border);
    border-radius: 2px;
    overflow: hidden;
    width: 100%;
    max-width: 220px;
}

.v4-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--v4-accent), #e8c882);
    border-radius: 2px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.22, 0.68, 0.18, 1);
    box-shadow: 0 0 12px var(--v4-accent-glow);
}

/* Step counter */
.v4-step-counter {
    font-size: 0.75rem;
    color: var(--v4-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Price widget */
.v4-price-widget {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--v4-accent-soft);
    padding: 10px 24px;
    border-radius: 100px;
    border: 1px solid rgba(213, 164, 91, 0.2);
}

.v4-price-label {
    font-size: 0.75rem;
    color: var(--v4-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.v4-price-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--v4-accent);
    letter-spacing: -0.5px;
}

/* ============================================================
   MAIN CONTAINER
   ============================================================ */
.v4-main-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 50px 24px 140px 24px;
    min-height: calc(100vh - 200px);
}

/* ============================================================
   STEPS — VISIBILITY & ANIMATIONS
   ============================================================ */
.v4-step {
    display: none;
}

.v4-step.active {
    display: block;
    animation: stepFadeIn 0.5s cubic-bezier(0.22, 0.68, 0.18, 1) both;
}


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

/* Step title — Art Brush conversational */
.v4-step-title {
    font-size: 2.8rem;
    font-weight: normal;
    margin-bottom: 12px;
    text-align: center;
    font-family: var(--display-font);
    color: var(--v4-accent);
    line-height: 1.25;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Step subtitle */
.v4-step-desc {
    text-align: center;
    color: var(--v4-text-muted);
    margin-bottom: 44px;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   CARDS — Premium Glass Style
   ============================================================ */
.v4-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 10px; /* Reduced padding since we removed overflow clipping risks */
    overflow: visible;
}

/* Visual cards with images (Step 1) */
.v4-card--visual {
    padding: 0 !important;
    border-radius: var(--v4-radius-lg);
}

.v4-card--visual .v4-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border-radius: inherit;
    width: 100%;
    height: 100%;
}

.v4-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.4s cubic-bezier(0.22, 0.68, 0.18, 1);
}

.v4-card--visual:hover .v4-card-img {
    transform: scale(1.05);
}

.v4-card-img-small {
    width: 100%;
    aspect-ratio: 1/1;
    height: auto;
    object-fit: cover;
    object-position: center bottom;
    display: block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.v4-card--visual:hover .v4-card-img-small {
    transform: scale(1.05);
}

.v4-card--visual .v4-card-title {
    padding: 14px 12px;
    font-size: 0.9rem;
}

/* Size cards (Step 2) */
.v4-card--size .v4-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 190px;
}
.dynamic-size-img {
    object-fit: contain;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
    border-radius: 8px;
}
.img-size-10 { height: 80px; }
.img-size-15 { height: 110px; }
.img-size-20 { height: 140px; }

.v4-card--size:hover .dynamic-size-img {
    transform: translateY(-4px);
}

.v4-breakout {
    width: 95vw;
    max-width: 1400px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.v4-cards-grid.small-grid {
    display: flex;
    flex-wrap: wrap; /* Wrap on small screens */
    overflow: visible;
    gap: 16px;
    padding: 10px;
    justify-content: center;
}
.v4-cards-grid.mini-grid, .v4-cards-grid.micro-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow: visible;
    gap: 10px;
    padding: 0 5px 10px;
    justify-content: center;
}

/* Modifier to allow wrapping for grids with many items (e.g. accessories) */
.v4-cards-grid.wrap-grid {
    flex-wrap: wrap !important;
}

/* Peinados: Aumentados un 40% (140px max) */
.v4-cards-grid.small-grid .v4-card {
    flex: 1 1 0;
    min-width: 110px;
    max-width: 150px;
    padding: 12px 8px;
}
/* Cejas: Aumentadas un 30% respecto a Ojos (120px max) */
.v4-cards-grid.mini-grid .v4-card {
    flex: 1 1 0;
    min-width: 85px;
    max-width: 125px;
    padding: 10px 6px;
}
/* Ojos: Muy pequeñas para que quepan (95px max) */
.v4-cards-grid.micro-grid .v4-card {
    flex: 1 1 0;
    min-width: 65px;
    max-width: 95px;
    padding: 8px 4px;
}

/* Titles and prices */
.v4-cards-grid.small-grid .v4-card-title { font-size: 0.9rem; padding: 10px 6px 4px; }
.v4-cards-grid.mini-grid .v4-card-title { font-size: 0.85rem !important; padding: 8px 6px 4px !important; }
.v4-cards-grid.micro-grid .v4-card-title { font-size: 0.75rem !important; padding: 6px 4px 2px !important; }

.v4-cards-grid.micro-grid .v4-card-price,
.v4-cards-grid.mini-grid .v4-card-price {
    font-size: 0.7rem !important;
    padding-bottom: 6px !important;
    margin-top: 2px !important;
}

/* Gender Cards (Masculino/Femenino) */
.v4-card--gender {
    min-width: 200px !important;
    flex: none !important;
}
.v4-card--gender:has(input:checked)::before {
    display: none !important; /* Hide checkmark to avoid overlapping text */
}
.v4-card--gender:has(input:checked) {
    transform: scale(1.05);
}
.v4-card--gender:has(input:checked) .v4-card-title {
    color: var(--v4-primary);
}

/* Row wrapper to put title on the left */
.v4-category-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: nowrap;
}
.v4-category-row .v4-cards-grid {
    flex: 1;
    justify-content: flex-start;
}
.v4-category-title {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--v4-accent);
    min-width: 120px;
    text-align: right;
    line-height: 1.3;
}
.v4-category-title small {
    display: block;
    font-size: 0.8rem;
    font-weight: normal;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .v4-category-row {
        flex-direction: column;
        gap: 0;
    }
    .v4-category-title {
        text-align: center;
        margin-bottom: 15px;
    }
}

.v4-cards-grid.single-row {
    display: flex;
    flex-wrap: nowrap;
    overflow: visible;
    gap: 16px;
    padding: 20px 10px;
    justify-content: center;
}

.v4-cards-grid.single-row .v4-card {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 190px;
}

/* Card base */
.v4-card {
    background: var(--v4-card-bg);
    border: 1px solid var(--v4-border);
    border-radius: var(--v4-radius);
    padding: 24px 16px;
    cursor: pointer;
    text-align: center;
    position: relative;
    /* Remove overflow: hidden so scale doesn't clip children if they pop out, though card itself scales */
    transition: all 0.3s cubic-bezier(0.22, 0.68, 0.18, 1);
    z-index: 1;
}

.v4-card.compact {
    padding: 16px 12px 22px;
}

/* Hidden native inputs */
.v4-card input[type="radio"],
.v4-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Hover */
.v4-card:hover {
    border-color: var(--v4-border-hover);
    background: var(--v4-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Selected state */
.v4-card:has(input:checked) {
    border-color: var(--v4-accent);
    background: var(--v4-accent-soft);
    transform: scale(1.2) !important; /* Grow selected item */
    margin: 0 14px; /* Push siblings physically to prevent overlap */
    z-index: 10;
    box-shadow:
        0 0 0 1px var(--v4-accent),
        0 0 20px var(--v4-accent-glow),
    0 8px 32px rgba(213, 164, 91, 0.1);
}

/* Unselected state when a sibling is selected (Dynamic Dim) */
.v4-cards-grid:has(.v4-card input:checked) .v4-card:not(:has(input:checked)) {
    opacity: 0.6; /* Dim to focus attention on selected without shrinking layout */
    z-index: 1;
}

/* Checkmark on selected */
.v4-card:has(input:checked)::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 10px;
    width: 22px;
    height: 22px;
    background: var(--v4-accent);
    color: #000;
    font-size: 12px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.v4-card:has(input:checked) .v4-card-content {
    color: var(--v4-text);
}

.v4-card-icon {
    font-size: 2.6rem;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.v4-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    display: block;
    color: var(--v4-text);
}

.v4-card-price {
    font-size: 0.8rem;
    color: var(--v4-text-muted);
    display: block;
    margin-top: 6px;
    font-weight: 500;
}

.v4-card:has(input:checked) .v4-card-price {
    color: var(--v4-accent);
}

/* ============================================================
   COLOR SWATCHES — Skin Tones
   ============================================================ */
.v4-colors-grid {
    display: flex;
    justify-content: center;
    gap: 36px;
    flex-wrap: wrap;
    max-width: 500px;
    margin: 0 auto;
}

.v4-color-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.v4-color-card:hover {
    transform: scale(1.08);
}

.v4-color-card input {
    display: none;
}

.v4-color-swatch {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 10px auto;
    border: 3px solid var(--v4-border);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.v4-color-card:has(input:checked) .v4-color-swatch {
    border-color: var(--v4-accent);
    box-shadow:
        0 0 0 3px var(--v4-accent-glow),
        0 0 20px var(--v4-accent-glow);
    transform: scale(1.1);
}

.v4-color-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--v4-text-muted);
    transition: color 0.2s ease;
}

.v4-color-card:has(input:checked) .v4-color-name {
    color: var(--v4-accent);
    font-weight: 600;
}

/* ============================================================
   FORM ELEMENTS — Inputs, Textareas, Selects
   ============================================================ */
.v4-form-group {
    margin-bottom: 24px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.v4-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--v4-text-muted);
    letter-spacing: 0.3px;
}

.v4-textarea,
.v4-input,
.v4-select {
    width: 100%;
    background: var(--v4-card-bg);
    border: 1px solid var(--v4-border);
    color: var(--v4-text);
    padding: 16px 18px;
    border-radius: var(--v4-radius);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.v4-select option {
    background: #1a1a24; /* Dark background to ensure light text is visible */
    color: var(--v4-text);
}

.v4-textarea {
    min-height: 60px;
    resize: vertical;
    border-radius: var(--v4-radius-lg);
}

.v4-textarea:focus,
.v4-input:focus,
.v4-select:focus {
    border-color: var(--v4-accent);
    box-shadow: 0 0 0 3px var(--v4-accent-soft);
}

/* Hidden color picker */
.hidden-color-picker {
    display: none;
    margin-top: 16px;
    background: var(--v4-card-bg);
    padding: 16px;
    border-radius: var(--v4-radius);
    border: 1px solid var(--v4-border);
    align-items: center;
    gap: 16px;
}

.hidden-color-picker.show {
    display: flex;
    animation: stepFadeIn 0.3s ease;
}

/* ============================================================
   DROPZONE OVERRIDES
   ============================================================ */
.v4-dropzone {
    background: var(--v4-accent-soft) !important;
    border: 2px dashed var(--v4-accent) !important;
    border-radius: var(--v4-radius-lg);
    color: var(--v4-text-muted);
    transition: all 0.3s ease;
    min-height: 45px !important;
    padding: 0 !important;
    cursor: pointer;
}

.v4-dropzone:hover {
    border-color: #fff !important;
    background: rgba(213, 164, 91, 0.25) !important;
    color: #fff !important;
}

.v4-dropzone .dz-message {
    font-weight: 500;
    font-size: 0.85rem;
    padding: 12px 10px !important;
    margin: 0 !important;
}

.v4-dropzone .dz-preview {
    margin: 5px !important;
    min-height: 50px !important;
}

.v4-dropzone .dz-preview .dz-image {
    width: 50px !important;
    height: 50px !important;
    border-radius: var(--v4-radius) !important;
}

/* ============================================================
   BUTTONS — Premium
   ============================================================ */
.v4-btn-primary {
    background: linear-gradient(135deg, var(--v4-accent), #c49a4a);
    color: #0a0a0f;
    border: none;
    padding: 14px 36px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 0.68, 0.18, 1);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.v4-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 60%);
    border-radius: inherit;
}

.v4-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--v4-accent-glow);
}

.v4-btn-primary:active {
    transform: translateY(0);
}

.v4-btn-secondary {
    background: transparent;
    color: var(--v4-text-muted);
    border: 1px solid var(--v4-border);
    padding: 14px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.v4-btn-secondary:hover {
    background: var(--v4-card-hover);
    color: var(--v4-text);
    border-color: var(--v4-border-hover);
}

/* ============================================================
   ACCORDIONS
   ============================================================ */
.v4-accordion {
    background: var(--v4-card-bg);
    border: 1px solid var(--v4-border);
    border-radius: var(--v4-radius-lg);
    margin-bottom: 15px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.v4-accordion[open] {
    border-color: var(--v4-accent);
}

.v4-accordion summary {
    padding: 16px 20px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--v4-accent);
    cursor: pointer;
    list-style: none; /* Hide default triangle */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.v4-accordion summary::-webkit-details-marker {
    display: none;
}

.v4-accordion summary::after {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.v4-accordion[open] summary::after {
    transform: rotate(180deg);
}

.v4-accordion-content {
    padding: 20px;
    border-top: 1px solid var(--v4-border);
    background: rgba(0, 0, 0, 0.2);
}

/* ============================================================
   CLOTHING / DYNAMIC SECTIONS
   ============================================================ */
.v4-clothing-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.v4-conditional-otro {
    background: rgba(213, 164, 91, 0.05); /* very light gold hue */
    border-radius: var(--v4-radius-lg);
    padding: 15px;
    border: 1px dashed var(--v4-accent);
    animation: fadeIn 0.3s ease;
    margin-top: 15px;
}

.v4-clothing-section h3 {
    margin-top: 0;
    margin-bottom: 14px;
    color: var(--v4-accent);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.v4-small-text {
    font-size: 0.85rem;
    color: var(--v4-text-muted);
    margin-top: 0;
    margin-bottom: 12px;
}

.v4-conditional-color {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--v4-border);
    animation: stepFadeIn 0.3s ease;
}

/* ============================================================
   COUNTER WIDGET — Mascotas
   ============================================================ */
.v4-counter-widget {
    display: inline-flex;
    align-items: center;
    background: var(--v4-card-bg);
    border: 1px solid var(--v4-border);
    border-radius: 100px;
    overflow: hidden;
}

.v4-counter-widget button {
    background: transparent;
    border: none;
    color: var(--v4-accent);
    font-size: 1.3rem;
    width: 52px;
    height: 52px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-weight: 700;
}

.v4-counter-widget button:hover {
    background: var(--v4-card-hover);
}

.v4-counter-widget input {
    background: transparent;
    border: none;
    color: var(--v4-text);
    font-size: 1.2rem;
    font-weight: 700;
    width: 44px;
    text-align: center;
    outline: none;
    -moz-appearance: textfield;
}

.v4-counter-widget input::-webkit-outer-spin-button,
.v4-counter-widget input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Large color input */
.v4-color-input-large {
    width: 60px;
    height: 60px;
    border: 2px solid var(--v4-border);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    background: transparent;
}

/* ============================================================
   MODALS
   ============================================================ */
.v4-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: none;
    justify-content: center;
    align-items: center;
}

.v4-modal-overlay.active {
    display: flex;
}

.v4-modal {
    background: var(--v4-bg);
    border: 1px solid var(--v4-border);
    padding: 32px;
    border-radius: var(--v4-radius-lg);
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: stepFadeIn 0.3s ease;
}

.v4-modal h3 {
    margin-top: 0;
    color: var(--v4-accent);
    font-size: 1.15rem;
}

/* ============================================================
   STAGGER ANIMATION DELAYS (cards appear one by one)
   ============================================================ */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.v4-step.active .v4-cards-grid > *,
.v4-step.active .v4-colors-grid > * {
    animation: cardFadeIn 0.4s cubic-bezier(0.22, 0.68, 0.18, 1) both;
}

.v4-step.active .v4-cards-grid > *:nth-child(1),
.v4-step.active .v4-colors-grid > *:nth-child(1) { animation-delay: 0.05s; }
.v4-step.active .v4-cards-grid > *:nth-child(2),
.v4-step.active .v4-colors-grid > *:nth-child(2) { animation-delay: 0.1s; }
.v4-step.active .v4-cards-grid > *:nth-child(3),
.v4-step.active .v4-colors-grid > *:nth-child(3) { animation-delay: 0.15s; }
.v4-step.active .v4-cards-grid > *:nth-child(4),
.v4-step.active .v4-colors-grid > *:nth-child(4) { animation-delay: 0.2s; }
.v4-step.active .v4-cards-grid > *:nth-child(5) { animation-delay: 0.25s; }
.v4-step.active .v4-cards-grid > *:nth-child(6) { animation-delay: 0.3s; }
.v4-step.active .v4-cards-grid > *:nth-child(7) { animation-delay: 0.35s; }

/* Form groups stagger */
.v4-step.active .v4-form-group,
.v4-step.active .v4-clothing-section {
    animation: cardFadeIn 0.4s cubic-bezier(0.22, 0.68, 0.18, 1) 0.1s both;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .v4-step-title {
        font-size: 2rem;
    }

    .v4-step-desc {
        font-size: 0.95rem;
        margin-bottom: 32px;
    }

    .v4-status-bar {
        padding: 0 16px;
        height: 70px;
        gap: 12px;
    }

    .v4-status-left {
        min-width: unset;
    }

    .v4-status-right {
        min-width: unset;
        gap: 8px;
    }

    .v4-btn-primary {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    .v4-btn-secondary {
        padding: 12px 18px;
        font-size: 0.8rem;
    }

    .v4-price-widget {
        padding: 8px 16px;
        gap: 8px;
    }

    .v4-price-value {
        font-size: 1.1rem;
    }

    .v4-cards-grid.single-row {
        justify-content: flex-start;
    }

    .v4-main-container {
        padding: 30px 16px 120px 16px;
    }
}

/* Modal Paleta de Colores */
.v4-color-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.v4-color-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.v4-color-modal {
    background: var(--v4-bg);
    border: 1px solid var(--v4-border);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05) inset;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.v4-color-modal-overlay.show .v4-color-modal {
    transform: translateY(0);
}
/* Tooltip para "Otros" */
.v4-otros-tooltip-right {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--v4-accent);
    color: #000;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(213, 164, 91, 0.4);
    pointer-events: none;
    z-index: 20;
    animation: v4-bounce-right 2s infinite ease-in-out;
}

.v4-otros-tooltip-right::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--v4-accent) transparent transparent transparent;
}

@keyframes v4-bounce-right {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -6px); }
}

.v4-card:has(input:checked) .v4-otros-tooltip-right {
    display: none;
}

/* Modal para Alertas Personalizadas */
.v4-alert-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.v4-alert-modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}
.v4-alert-modal {
    background: #1a1a1a;
    border: 1px solid rgba(213, 164, 91, 0.3);
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.v4-alert-modal-overlay.show .v4-alert-modal {
    transform: scale(1);
}
.v4-alert-title {
    color: var(--v4-accent);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 15px;
    letter-spacing: 1px;
}
.v4-alert-message {
    color: #eee;
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.5;
}
.v4-alert-btn {
    width: 100%;
    padding: 12px;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
}
