﻿/**
 * CHECKOUT TECH - Estilos Premium para Checkout
 * Tema: Tecnología - Azul Noche + Plateado
 */

/* ============================================
   VARIABLES CSS - TEMA TECH
============================================ */
:root {
    /* Colores principales - Azul Noche */
    --checkout-primary: #0f172a;
    --checkout-secondary: #1e293b;
    --checkout-tertiary: #334155;

    /* Acentos */
    --checkout-accent: #3b82f6;
    --checkout-accent-hover: #2563eb;
    --checkout-accent-light: #60a5fa;
    --checkout-purple: #3b82f6;
    --checkout-success: #10b981;
    --checkout-warning: #f59e0b;
    --checkout-danger: #ef4444;

    /* Plateados */
    --checkout-silver: #e2e8f0;
    --checkout-silver-dark: #64748b;

    /* Fondos */
    --checkout-bg: #f1f5f9;
    --checkout-bg-card: #ffffff;

    /* Texto */
    --checkout-text: #0f172a;
    --checkout-text-secondary: #64748b;
    --checkout-text-light: #f8fafc;

    /* Sombras */
    --checkout-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --checkout-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.1);
    --checkout-shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);
    --checkout-shadow-xl: 0 20px 50px rgba(15, 23, 42, 0.18);

    /* Transiciones */
    --checkout-transition: 0.3s ease;
}

/* ============================================
   RESET Y BASE
============================================ */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--checkout-bg);
    color: var(--checkout-text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Scrollbar Tech */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--checkout-accent) 0%, var(--checkout-purple) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--checkout-accent-hover) 0%, #1d4ed8 100%);
}

/* ============================================
   CONTENEDOR PRINCIPAL
============================================ */
.container-py {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.py-5 {
    padding: 2.5rem 0 3rem;
}

/* ============================================
   HEADER TECH - HERO SECTION
============================================ */
.checkout-header-premium {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--checkout-primary) 0%, var(--checkout-secondary) 50%, #1a365d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.checkout-header-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.checkout-header-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.checkout-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2.5rem 1.5rem;
}

.checkout-titulo-principal {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.checkout-subtitulo {
    font-size: 1.1rem;
    color: var(--checkout-silver);
    max-width: 500px;
    margin: 0 auto;
    opacity: 0.9;
}

/* ============================================
   BREADCRUMB TECH
============================================ */
.checkout-breadcrumb-premium {
    background: var(--checkout-bg-card);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--checkout-shadow-sm);
}

.checkout-breadcrumb-premium .breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    align-items: center;
    gap: 0.5rem;
}

.checkout-breadcrumb-premium .breadcrumb-item {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.checkout-breadcrumb-premium .breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    padding: 0 0.5rem;
    color: var(--checkout-silver-dark);
    font-weight: 300;
}

.checkout-breadcrumb-premium .breadcrumb-item a {
    color: var(--checkout-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--checkout-transition);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.checkout-breadcrumb-premium .breadcrumb-item a:hover {
    color: var(--checkout-accent);
}

.checkout-breadcrumb-premium .breadcrumb-item.active {
    color: var(--checkout-text);
    font-weight: 600;
}

/* ============================================
   PASOS DEL PROCESO - STEPPER
============================================ */
.checkout-pasos-container {
    margin-bottom: 2rem;
}

.checkout-pasos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    background: var(--checkout-bg-card);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    box-shadow: var(--checkout-shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.checkout-paso {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 160px;
    z-index: 1;
}

.checkout-paso:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    left: 60%;
    width: 80%;
    height: 3px;
    background: var(--checkout-silver);
    border-radius: 2px;
    z-index: 0;
}

.checkout-paso.completado:not(:last-child)::after {
    background: linear-gradient(90deg, var(--checkout-success) 0%, var(--checkout-accent) 100%);
}

.checkout-paso-icono {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    transition: all var(--checkout-transition);
    position: relative;
    z-index: 2;
    border: 3px solid transparent;
}

.checkout-paso.pendiente .checkout-paso-icono {
    background: var(--checkout-silver);
    color: var(--checkout-text-secondary);
}

.checkout-paso.activo .checkout-paso-icono {
    background: linear-gradient(135deg, var(--checkout-accent) 0%, var(--checkout-purple) 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); }
    50% { transform: scale(1.08); box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5); }
}

.checkout-paso.completado .checkout-paso-icono {
    background: linear-gradient(135deg, var(--checkout-success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.checkout-paso-texto {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--checkout-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.checkout-paso.activo .checkout-paso-texto {
    color: var(--checkout-accent);
}

.checkout-paso.completado .checkout-paso-texto {
    color: var(--checkout-success);
}

/* Barra de progreso mobile */
.checkout-progress-bar-mobile {
    display: none;
    background: var(--checkout-bg-card);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--checkout-shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-progress-title-mobile {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--checkout-text);
    margin-bottom: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkout-progress-title-mobile i {
    color: var(--checkout-accent);
}

.checkout-progress-track {
    height: 8px;
    background: var(--checkout-silver);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.checkout-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--checkout-accent) 0%, var(--checkout-purple) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.checkout-progress-label {
    font-size: 0.8rem;
    color: var(--checkout-text-secondary);
    text-align: right;
    font-weight: 500;
}

/* ============================================
   GRID DE CHECKOUT - DOS COLUMNAS
============================================ */
.checkout-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1rem;
    align-items: flex-start;
}

.checkout-col-main {
    flex: 0 0 65%;
    max-width: 65%;
    padding: 0 1rem;
}

.checkout-col-sidebar {
    flex: 0 0 35%;
    max-width: 35%;
    padding: 0 1rem;
    position: sticky;
    top: 1.5rem;
}

/* ============================================
   CARDS PREMIUM
============================================ */
.checkout-card-premium {
    background: var(--checkout-bg-card);
    border-radius: 24px;
    box-shadow: var(--checkout-shadow-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-card-header-premium {
    background: linear-gradient(135deg, var(--checkout-primary) 0%, var(--checkout-secondary) 100%);
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.checkout-card-header-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 0% 0%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.checkout-card-header-premium h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--checkout-text-light);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.checkout-card-header-icono {
    width: 44px;
    height: 44px;
    background: rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--checkout-accent-light);
}

.checkout-card-body-premium {
    padding: 2rem;
}

/* ============================================
   SECCIONES DEL FORMULARIO
============================================ */
.checkout-seccion-formulario {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-seccion-formulario:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.checkout-seccion-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--checkout-text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.checkout-seccion-icono {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--checkout-accent);
    font-size: 1rem;
}

/* ============================================
   SISTEMA DE GRID - ROWS Y COLUMNS
============================================ */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 0.75rem;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 0.75rem;
}

/* ============================================
   INPUTS PREMIUM
============================================ */
.checkout-input-group {
    margin-bottom: 1.25rem;
}

.checkout-label-premium {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--checkout-text);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.checkout-label-premium i {
    color: var(--checkout-accent);
    font-size: 0.8rem;
}

.checkout-input-premium {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--checkout-text);
    background: var(--checkout-bg);
    border: 2px solid #7eb3f7;
    border-radius: 14px;
    transition: all var(--checkout-transition);
    outline: none;
}

.checkout-input-premium:hover {
    background: #f8fafc;
}

.checkout-input-premium:focus {
    background: var(--checkout-bg-card);
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.checkout-input-premium::placeholder {
    color: var(--checkout-silver-dark);
}

.checkout-input-premium:disabled {
    background: var(--checkout-silver);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Select estilizado */
select.checkout-input-premium {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Textarea */
textarea.checkout-input-premium {
    min-height: 90px;
    resize: vertical;
    line-height: 1.6;
}

/* Texto de ayuda */
.text-muted,
.checkout-help-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--checkout-text-secondary);
    line-height: 1.4;
}

small.text-muted {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ============================================
   SECCIÓN DIRECCIÓN DE ENVÍO - MAPA
============================================ */

/* Contenedor de búsqueda */
.map-search-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.map-search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--checkout-text);
    background: var(--checkout-bg);
    border: 2px solid #7eb3f7;
    border-radius: 12px;
    transition: all var(--checkout-transition);
    outline: none;
}

.map-search-input:focus {
    background: var(--checkout-bg-card);
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.map-search-input::placeholder {
    color: var(--checkout-silver-dark);
}

.map-search-btn,
.map-gps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--checkout-transition);
    white-space: nowrap;
}

.map-search-btn {
    background: linear-gradient(135deg, var(--checkout-accent) 0%, var(--checkout-purple) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.map-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.map-gps-btn {
    background: var(--checkout-bg);
    color: var(--checkout-text);
    border: 2px solid var(--checkout-silver);
}

.map-gps-btn:hover {
    background: var(--checkout-accent);
    color: white;
    border-color: var(--checkout-accent);
    transform: translateY(-2px);
}

.map-gps-btn i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.map-gps-contenido {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
}

.map-gps-titulo {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
}

.map-gps-subtitulo {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.75;
    line-height: 1.2;
}

/* Instrucciones del mapa */
.map-instructions {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.map-instructions-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--checkout-accent);
    margin-bottom: 0.875rem;
}

.map-instructions-title i {
    font-size: 1rem;
}

.map-instructions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.625rem;
}

.map-instructions-list li {
    font-size: 0.85rem;
    color: var(--checkout-text-secondary);
    padding-left: 0.5rem;
    line-height: 1.5;
}

.map-instructions-list li strong {
    color: var(--checkout-text);
    font-weight: 600;
}

/* Contenedor del mapa */
.checkout-map-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: var(--checkout-shadow-md);
    border: 2px solid rgba(59, 130, 246, 0.15);
}

#mapa-direccion {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.map-hint-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 50%, transparent 100%);
    padding: 2rem 1rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
}

.map-hint-overlay i {
    font-size: 1.1rem;
    color: var(--checkout-accent-light);
    animation: pulse-hint 2s ease-in-out infinite;
}

@keyframes pulse-hint {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.map-hint-text {
    opacity: 0.95;
}

/* Información del proveedor de mapas */
.map-provider-container {
    text-align: center;
    margin-top: 0.75rem;
}

#map-provider-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--checkout-bg);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--checkout-text-secondary);
}

#map-provider-info i {
    color: var(--checkout-accent);
}

/* ============================================
   FOTO DE REFERENCIA DEL DOMICILIO
============================================ */
.foto-direccion-container {
    background: var(--checkout-bg);
    border-radius: 14px;
    padding: 1.25rem;
    margin-top: 0.5rem;
}

.foto-direccion-input-wrapper {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.foto-direccion-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--checkout-bg-card);
    color: var(--checkout-text);
    border: 2px dashed var(--checkout-silver);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--checkout-transition);
    flex: 1;
    min-width: 140px;
}

.foto-direccion-btn:hover {
    border-color: var(--checkout-accent);
    color: var(--checkout-accent);
    background: rgba(59, 130, 246, 0.05);
}

.foto-direccion-btn i {
    font-size: 1rem;
}

.foto-remove-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 0.9rem;
    background: rgba(239, 68, 68, 0.1);
    color: var(--checkout-danger);
    border: 2px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--checkout-transition);
}

.foto-remove-btn:hover {
    background: var(--checkout-danger);
    color: white;
    border-color: var(--checkout-danger);
}

.foto-remove-btn.visible {
    display: flex;
}

.foto-direccion-input {
    display: none;
}

/* ============================================
   DIRECCION HELP TEXT
============================================ */
#direccion-help {
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--checkout-success);
}

#direccion-help.visible {
    display: flex;
}

#direccion-help i {
    font-size: 0.75rem;
}

/* ============================================
   RESPONSIVE - SECCIÓN DIRECCIÓN
============================================ */
@media (max-width: 768px) {
    .map-search-container {
        flex-direction: column;
    }

    .map-search-input {
        width: 100%;
    }

    .map-search-btn,
    .map-gps-btn {
        flex: 1;
    }

    .map-search-btn span,
    .map-gps-btn span {
        display: inline;
    }

    #mapa-direccion {
        height: 220px;
    }

    .map-instructions {
        padding: 1rem;
    }

    .map-instructions-list li {
        font-size: 0.8rem;
    }

    .foto-direccion-btn {
        min-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    /* Buscar: span oculto, solo icono */
    .map-search-btn span {
        display: none;
    }

    .map-search-btn {
        padding: 0.875rem;
        flex: 0;
        min-width: 52px;
    }

    /* GPS: full-width con texto descriptivo siempre visible */
    .map-gps-btn {
        width: 100%;
        flex: 1 1 100%;
        padding: 0.875rem 1.25rem;
        justify-content: center;
        gap: 0.75rem;
    }

    .map-gps-btn .map-gps-contenido {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
    }

    .map-gps-btn .map-gps-titulo {
        font-size: 0.875rem;
        font-weight: 700;
        line-height: 1.2;
    }

    .map-gps-btn .map-gps-subtitulo {
        font-size: 0.72rem;
        font-weight: 400;
        opacity: 0.8;
        line-height: 1.2;
    }

    /* Primera fila: input + botón buscar */
    .map-search-container {
        flex-wrap: wrap;
    }

    .map-search-input {
        flex: 1 1 calc(100% - 68px);
    }

    .foto-direccion-input-wrapper {
        flex-direction: column;
    }

    .foto-direccion-btn {
        width: 100%;
    }

    .foto-remove-btn {
        width: 100%;
        height: auto;
        padding: 0.75rem;
    }
}

/* ============================================
   RESUMEN DEL PEDIDO (SIDEBAR)
============================================ */
.checkout-resumen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-resumen-titulo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--checkout-text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.checkout-resumen-titulo i {
    color: var(--checkout-accent);
}

.checkout-items-count {
    background: linear-gradient(135deg, var(--checkout-accent) 0%, var(--checkout-purple) 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
}

/* Items del resumen */
.checkout-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    align-items: center;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-imagen {
    width: 75px;
    height: 75px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--checkout-bg);
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-item-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.35rem;
}

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

.checkout-item-nombre {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--checkout-text);
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-item-cantidad {
    font-size: 0.8rem;
    color: var(--checkout-text-secondary);
}

.checkout-item-precio {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--checkout-accent);
    text-align: right;
}

/* Totales */
.checkout-totales {
    background: linear-gradient(135deg, var(--checkout-bg) 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 1.25rem;
}

.checkout-total-fila {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
}

.checkout-total-fila.total-final {
    padding-top: 1.25rem;
    margin-top: 0.75rem;
    border-top: 2px dashed rgba(0, 0, 0, 0.1);
}

.checkout-total-label {
    font-size: 0.95rem;
    color: var(--checkout-text-secondary);
}

.checkout-total-valor {
    font-size: 1rem;
    font-weight: 600;
    color: var(--checkout-text);
}

.checkout-total-fila.total-final .checkout-total-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--checkout-text);
}

.checkout-total-fila.total-final .checkout-total-valor {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--checkout-accent) 0%, var(--checkout-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.checkout-envio-gratis {
    color: var(--checkout-success);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ============================================
   BOTONES
============================================ */
.checkout-btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all var(--checkout-transition);
    position: relative;
    overflow: hidden;
}

.checkout-btn-premium.btn-primary {
    background: linear-gradient(135deg, var(--checkout-accent) 0%, var(--checkout-accent-hover) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.checkout-btn-premium.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.checkout-btn-premium.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.checkout-btn-premium.btn-primary:hover::before {
    left: 100%;
}

.checkout-btn-premium.btn-primary:active {
    transform: translateY(-1px);
}

.checkout-btn-premium.btn-secondary {
    background: var(--checkout-bg);
    color: var(--checkout-text);
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.checkout-btn-premium.btn-secondary:hover {
    border-color: var(--checkout-accent);
    color: var(--checkout-accent);
    background: rgba(59, 130, 246, 0.05);
}

.checkout-btn-premium:disabled {
    background: var(--checkout-silver);
    color: var(--checkout-text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================
   MÉTODOS DE PAGO
============================================ */
.checkout-metodos-pago {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.checkout-metodo-pago {
    position: relative;
}

.checkout-metodo-pago input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkout-metodo-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--checkout-bg);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all var(--checkout-transition);
    position: relative;
    overflow: hidden;
}

.checkout-metodo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--checkout-transition);
}

.checkout-metodo-card:hover {
    border-color: var(--checkout-silver-dark);
    background: #f8fafc;
    transform: translateY(-2px);
}

.checkout-metodo-card:hover::before {
    opacity: 1;
}

/* Estado seleccionado */
.checkout-metodo-pago input[type="radio"]:checked + .checkout-metodo-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), var(--checkout-shadow-md);
}

.checkout-metodo-pago input[type="radio"]:checked + .checkout-metodo-card .checkout-metodo-check {
    opacity: 1;
    transform: scale(1);
}

.checkout-metodo-pago input[type="radio"]:checked + .checkout-metodo-card .checkout-metodo-icono {
    transform: scale(1.05);
}

/* Icono del método */
.checkout-metodo-icono {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: var(--checkout-shadow-sm);
    transition: transform var(--checkout-transition);
    position: relative;
    z-index: 1;
}

/* Icono específico para transferencia */
.checkout-metodo-transferencia {
    background: linear-gradient(135deg, var(--checkout-accent), var(--checkout-purple));
}

/* Información del método */
.checkout-metodo-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.checkout-metodo-info h6 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--checkout-text);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.checkout-metodo-info p {
    font-size: 0.8rem;
    color: var(--checkout-text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Check de selección */
.checkout-metodo-check {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: linear-gradient(135deg, var(--checkout-accent) 0%, var(--checkout-purple) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--checkout-transition);
    position: relative;
    z-index: 1;
}

/* Responsive métodos de pago */
@media (max-width: 576px) {
    .checkout-metodos-pago {
        grid-template-columns: 1fr;
    }

    .checkout-metodo-card {
        padding: 1rem;
    }

    .checkout-metodo-icono {
        width: 46px;
        height: 46px;
        min-width: 46px;
        font-size: 1.1rem;
    }

    .checkout-metodo-info h6 {
        font-size: 0.9rem;
    }

    .checkout-metodo-info p {
        font-size: 0.75rem;
    }
}

/* ============================================
   SEGURIDAD
============================================ */
.checkout-seguridad {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.25rem;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 14px;
    margin-top: 1.25rem;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.checkout-seguridad i {
    color: var(--checkout-success);
    font-size: 1.1rem;
}

.checkout-seguridad span {
    font-size: 0.9rem;
    color: var(--checkout-text-secondary);
    font-weight: 500;
}

/* ============================================
   ALERTAS
============================================ */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

/* ============================================
   MODAL LOGIN TECH
============================================ */
.login-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    z-index: 9999;
    overflow-y: auto;
    padding: 1.5rem;
}

.login-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-modal-container {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: var(--checkout-bg-card);
    border-radius: 24px;
    box-shadow: var(--checkout-shadow-xl);
    overflow: hidden;
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-modal-header {
    background: linear-gradient(135deg, var(--checkout-primary) 0%, var(--checkout-secondary) 100%);
    padding: 1.25rem 1.5rem;
    text-align: center;
    position: relative;
    flex-shrink: 0;
}

.login-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
}

.login-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--checkout-transition);
    color: white;
    font-size: 1.1rem;
    z-index: 1;
}

.login-modal-close:hover {
    background: var(--checkout-danger);
    border-color: var(--checkout-danger);
    transform: rotate(90deg);
}

.login-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--checkout-text-light);
    margin: 0 0 0.25rem 0;
    position: relative;
}

.login-modal-subtitle {
    font-size: 0.85rem;
    color: var(--checkout-silver-dark);
    position: relative;
}

.login-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.login-form-group {
    margin-bottom: 1.1rem;
    position: relative;
}

.login-form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--checkout-text);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.login-form-input {
    width: 100%;
    padding: 0.8rem 1.1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--checkout-text);
    background: var(--checkout-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all var(--checkout-transition);
    outline: none;
}

.login-form-input:focus {
    background: var(--checkout-bg-card);
    border-color: var(--checkout-accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.login-form-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--checkout-accent) 0%, var(--checkout-accent-hover) 100%);
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--checkout-transition);
}

.login-form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.login-footer-text {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--checkout-text-secondary);
}

.login-footer-text a {
    color: var(--checkout-accent);
    text-decoration: none;
    font-weight: 600;
}

.login-footer-text a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1200px) {
    .checkout-col-main {
        flex: 0 0 60%;
        max-width: 60%;
    }

    .checkout-col-sidebar {
        flex: 0 0 40%;
        max-width: 40%;
    }
}

@media (max-width: 991px) {
    .checkout-col-main,
    .checkout-col-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .checkout-col-sidebar {
        margin-top: 1.5rem;
        position: static;
    }

    .checkout-pasos {
        display: none;
    }

    .checkout-progress-bar-mobile {
        display: block;
    }
}

@media (max-width: 768px) {
    .checkout-titulo-principal {
        font-size: 2rem;
    }

    .checkout-header-premium {
        min-height: 180px;
    }

    .checkout-subtitulo {
        font-size: 1rem;
    }

    .checkout-metodos-pago {
        grid-template-columns: 1fr;
    }

    .checkout-card-body-premium {
        padding: 1.5rem;
    }

    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .row {
        margin: 0 -0.5rem;
    }

    .row > [class*="col-"] {
        padding: 0 0.5rem;
    }
}

@media (max-width: 576px) {
    .container-py {
        padding: 0 1rem;
    }

    .py-5 {
        padding: 1.5rem 0 2rem;
    }

    .checkout-titulo-principal {
        font-size: 1.6rem;
    }

    .checkout-header-premium {
        min-height: 150px;
    }

    .checkout-header-content {
        padding: 1.5rem 1rem;
    }

    .checkout-card-premium {
        border-radius: 18px;
    }

    .checkout-card-header-premium {
        padding: 1.25rem 1.5rem;
    }

    .checkout-card-header-premium h4 {
        font-size: 1.1rem;
    }

    .checkout-card-body-premium {
        padding: 1.25rem;
    }

    .checkout-btn-premium {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    .checkout-breadcrumb-premium {
        padding: 0.875rem 1rem;
    }

    .checkout-breadcrumb-premium .breadcrumb-item {
        font-size: 0.8rem;
    }
}

/* ============================================
   UTILIDADES
============================================ */
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1rem; }
.d-none { display: none; }
.d-flex { display: flex; }
.text-center { text-align: center; }

/* Animaciones */
.checkout-fade-in {
    animation: checkoutFadeIn 0.6s ease forwards;
}

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

.checkout-delay-1 { animation-delay: 0.1s; }
.checkout-delay-2 { animation-delay: 0.2s; }
.checkout-delay-3 { animation-delay: 0.3s; }

/* ============================================
   ESTILOS ADICIONALES PARA FORMULARIOS
============================================ */

/* Checkbox y Radio buttons estilizados */
.checkout-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--checkout-bg);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--checkout-transition);
}

.checkout-checkbox-group:hover {
    background: #f8fafc;
}

.checkout-checkbox-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--checkout-accent);
    cursor: pointer;
    margin-top: 2px;
}

.checkout-checkbox-label {
    font-size: 0.95rem;
    color: var(--checkout-text);
    line-height: 1.5;
}

.checkout-checkbox-label a {
    color: var(--checkout-accent);
    font-weight: 600;
    text-decoration: none;
}

.checkout-checkbox-label a:hover {
    text-decoration: underline;
}

/* Botones de acción flotantes */
.checkout-acciones-flotantes {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--checkout-bg-card);
    padding: 1rem 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
}

@media (max-width: 991px) {
    .checkout-acciones-flotantes {
        display: block;
    }

    body {
        padding-bottom: 100px;
    }
}

/* ============================================
   DETALLES DE MÉTODO DE PAGO
============================================ */
.checkout-tarjeta-detalles {
    background: var(--checkout-bg-card);
    border-radius: 14px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--checkout-shadow-sm);
    animation: slideDown 0.3s ease-out;
}

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

.checkout-tarjeta-detalles .alert {
    margin-bottom: 0;
    border: none;
}

.checkout-tarjeta-detalles .alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 14px;
}

.checkout-tarjeta-detalles .alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 14px;
}

.checkout-tarjeta-detalles .alert-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--checkout-text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkout-tarjeta-detalles .alert-heading i {
    color: var(--checkout-accent);
}

.checkout-tarjeta-detalles hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    margin: 1rem 0;
}

.checkout-tarjeta-detalles p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--checkout-text-secondary);
}

.checkout-tarjeta-detalles p strong {
    color: var(--checkout-text);
}

/* Lista de pasos */
.checkout-tarjeta-detalles .mb-2 {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.checkout-tarjeta-detalles .mb-2:last-of-type {
    border-bottom: none;
}

/* Caja de importante */
.checkout-tarjeta-detalles .mt-3[style*="dashed"] {
    background: rgba(255, 255, 255, 0.8);
    border: 2px dashed var(--checkout-success);
    border-radius: 12px;
    padding: 1rem;
}

/* Métodos aceptados */
.checkout-metodos-aceptados {
    background: var(--checkout-bg);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-metodos-aceptados > p {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--checkout-success);
    margin-bottom: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkout-metodos-aceptados ul {
    margin: 0;
    padding-left: 1.5rem;
}

.checkout-metodos-aceptados li {
    font-size: 0.8rem;
    color: var(--checkout-text-secondary);
    padding: 0.2rem 0;
}

/* ============================================
   INSTRUCCIONES DE PAGO
============================================ */
.checkout-pago-instrucciones {
    background: var(--checkout-bg);
    border-radius: 12px;
    padding: 1rem;
}

.checkout-pago-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.checkout-pago-header-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
}

.checkout-pago-header-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.checkout-pago-header-icon.info {
    background: linear-gradient(135deg, var(--checkout-accent) 0%, var(--checkout-purple) 100%);
}

.checkout-pago-header h6 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--checkout-text);
    margin: 0 0 0.25rem 0;
}

.checkout-pago-header p {
    font-size: 0.85rem;
    color: var(--checkout-text-secondary);
    margin: 0;
}

/* Lista de pasos */
.checkout-pasos-lista {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checkout-paso {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: var(--checkout-bg-card);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.04);
}

.checkout-paso-num {
    width: 22px;
    height: 22px;
    min-width: 22px;
    background: linear-gradient(135deg, var(--checkout-success) 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.checkout-paso span:last-child {
    font-size: 0.8rem;
    color: var(--checkout-text-secondary);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .checkout-pasos-lista {
        grid-template-columns: 1fr;
    }
}

/* Nota importante */
.checkout-pago-importante {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
}

.checkout-pago-importante i {
    color: var(--checkout-warning);
    font-size: 1rem;
}

.checkout-pago-importante p {
    font-size: 0.8rem;
    color: var(--checkout-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.checkout-pago-importante strong {
    color: var(--checkout-text);
}

/* Nota de tiempo */
.checkout-pago-nota {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 10px;
    margin-top: 1rem;
}

.checkout-pago-nota i {
    color: var(--checkout-accent);
}

.checkout-pago-nota p {
    font-size: 0.85rem;
    color: var(--checkout-text-secondary);
    margin: 0;
}

/* Métodos mini iconos */
.checkout-metodos-iconos {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.checkout-metodo-mini {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: var(--checkout-bg-card);
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.06);
}

.checkout-metodo-mini i {
    color: var(--checkout-success);
    font-size: 0.9rem;
}

.checkout-metodo-mini span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--checkout-text);
}

/* Datos bancarios */
.checkout-datos-bancarios {
    display: grid;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.checkout-dato-bancario {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--checkout-bg-card);
    border-radius: 10px;
    gap: 0.875rem;
    border: 1px solid rgba(0,0,0,0.04);
}

.checkout-dato-bancario > i {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--checkout-accent);
    font-size: 0.9rem;
}

.checkout-dato-content {
    flex: 1;
    min-width: 0;
}

.checkout-dato-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--checkout-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.125rem;
}

.checkout-dato-valor {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--checkout-text);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    word-break: break-all;
}

/* Upload section */
.checkout-upload-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.checkout-upload-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--checkout-text);
    margin-bottom: 0.875rem;
}

.checkout-upload-label i {
    color: var(--checkout-accent);
}

.checkout-upload-label .required {
    color: var(--checkout-danger);
}

/* PDF Preview */
.boucher-pdf-preview {
    display: none;
    padding: 1.5rem;
    text-align: center;
    background: var(--checkout-bg);
    border-radius: 8px;
}

.boucher-pdf-preview i {
    font-size: 3rem;
    color: #ef4444;
}

.boucher-pdf-preview p {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: var(--checkout-text-secondary);
}

/* Responsive */
@media (max-width: 576px) {
    .checkout-pago-header {
        flex-direction: column;
        text-align: center;
    }

    .checkout-metodos-iconos {
        justify-content: center;
    }

    .checkout-dato-bancario {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .checkout-dato-content {
        text-align: center;
    }
}

/* ============================================
   FOTO/ARCHIVO UPLOAD
============================================ */
.foto-direccion-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.foto-direccion-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--checkout-bg) 0%, #f1f5f9 100%);
    border: 2px dashed var(--checkout-silver-dark);
    border-radius: 14px;
    color: var(--checkout-text);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--checkout-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.foto-direccion-btn:hover {
    border-color: var(--checkout-accent);
    background: rgba(59, 130, 246, 0.05);
    color: var(--checkout-accent);
}

.foto-direccion-btn i {
    font-size: 1.1rem;
}

.foto-remove-btn {
    width: 48px;
    height: 48px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 12px;
    color: var(--checkout-danger);
    cursor: pointer;
    transition: all var(--checkout-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.foto-remove-btn:hover {
    background: var(--checkout-danger);
    color: white;
}

.foto-direccion-input {
    display: none;
}

.foto-direccion-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--checkout-text-secondary);
    margin-top: 0.75rem;
    padding: 0.5rem 0;
}

.foto-direccion-label i {
    color: var(--checkout-accent);
    font-size: 0.85rem;
}

/* Preview de la foto mejorado */
.foto-direccion-preview {
    margin-top: 1rem;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(59, 130, 246, 0.2);
    background: var(--checkout-bg-card);
    box-shadow: var(--checkout-shadow-sm);
}

.foto-preview-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.foto-preview-header i {
    color: var(--checkout-accent);
    font-size: 1rem;
}

.foto-preview-header span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--checkout-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foto-direccion-preview img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    background: var(--checkout-bg);
    display: block;
    padding: 0.5rem;
}

/* ============================================
   PRODUCTOS EN EL RESUMEN - SIDEBAR
============================================ */
.checkout-producto-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--checkout-bg);
    border-radius: 14px;
    margin-bottom: 0.75rem;
    transition: all var(--checkout-transition);
}

.checkout-producto-item:hover {
    background: #f8fafc;
}

.checkout-producto-item:last-child {
    margin-bottom: 0;
}

.checkout-producto-imagen {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

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

.checkout-producto-nombre {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--checkout-text);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.checkout-producto-detalles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--checkout-text-secondary);
}

.checkout-producto-precio {
    font-weight: 700;
    color: var(--checkout-accent);
    font-size: 0.95rem;
}

/* ============================================
   CONTROL DE CANTIDAD EN RESUMEN
============================================ */
.checkout-qty-control {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.checkout-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: #475569;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.checkout-qty-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.checkout-qty-btn:active {
    background: #cbd5e1;
}

.checkout-qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    padding: 0 2px;
    user-select: none;
}

/* ============================================
   TOTALES EN EL RESUMEN
============================================ */
.checkout-total-linea {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    font-size: 0.95rem;
}

.checkout-total-linea.total-final {
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px dashed rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
    font-weight: 700;
}

.checkout-total-precio {
    font-weight: 600;
    color: var(--checkout-text);
}

.checkout-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 1rem 0;
}

/* ============================================
   BOTÓN FINALIZAR COMPRA
============================================ */
.checkout-btn-finalizar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.1rem 1.5rem;
    margin-top: 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--checkout-accent) 0%, var(--checkout-purple) 100%);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--checkout-transition);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.checkout-btn-finalizar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.checkout-btn-finalizar:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.checkout-btn-finalizar:hover::before {
    left: 100%;
}

.checkout-btn-finalizar:active {
    transform: translateY(-1px);
}

.checkout-btn-finalizar:disabled {
    background: var(--checkout-silver);
    color: var(--checkout-text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================
   POLÍTICAS Y GARANTÍAS
============================================ */
.checkout-politicas {
    background: var(--checkout-bg-card);
    border-radius: 18px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--checkout-shadow-sm);
}

.checkout-politicas-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--checkout-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.checkout-politicas-icono {
    color: var(--checkout-accent);
    font-size: 1.1rem;
}

.checkout-politicas-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--checkout-text-secondary);
}

.checkout-politicas-item i {
    color: var(--checkout-accent);
    width: 18px;
    text-align: center;
}

/* ============================================
   RESUMEN PREMIUM WRAPPER
============================================ */
.checkout-resumen-premium {
    position: sticky;
    top: 1.5rem;
}

/* ============================================
   VARIABLES LEGACY (compatibilidad)
============================================ */
:root {
    --checkout-color-primario: var(--checkout-primary);
    --checkout-color-secundario: var(--checkout-accent);
    --checkout-color-acento: var(--checkout-purple);
    --checkout-color-texto-primario: var(--checkout-text);
    --checkout-color-texto-secundario: var(--checkout-text-secondary);
}

/* ============================================
   RESPONSIVE PRODUCTOS
============================================ */
@media (max-width: 576px) {
    .checkout-producto-item {
        padding: 0.875rem;
        gap: 0.75rem;
    }

    .checkout-producto-imagen {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }

    .checkout-producto-nombre {
        font-size: 0.85rem;
    }

    .checkout-producto-detalles {
        font-size: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .checkout-producto-precio {
        font-size: 0.9rem;
    }

    .checkout-btn-finalizar {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .checkout-politicas {
        padding: 1.25rem;
    }
}

/* ============================================
   ACCESIBILIDAD - SR-ONLY
============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   SKELETON LOADING (Phase 1.2)
============================================ */
@keyframes skeletonShimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.checkout-skeleton {
    pointer-events: none;
}

.checkout-skeleton-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 14px;
    background: var(--checkout-bg);
}

.checkout-skeleton-image {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 10px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 800px 100%;
    animation: skeletonShimmer 1.5s infinite linear;
}

.checkout-skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkout-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 800px 100%;
    animation: skeletonShimmer 1.5s infinite linear;
}

.checkout-skeleton-line:first-child { width: 70%; height: 14px; }
.checkout-skeleton-line:nth-child(2) { width: 50%; }
.checkout-skeleton-line:last-child { width: 30%; }

.checkout-skeleton-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.checkout-skeleton-total .checkout-skeleton-line { width: 40%; }
.checkout-skeleton-total .checkout-skeleton-line:last-child { width: 25%; }

.checkout-skeleton-btn {
    height: 52px;
    border-radius: 14px;
    margin-top: 1.25rem;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 800px 100%;
    animation: skeletonShimmer 1.5s infinite linear;
}

/* ============================================
   AUTO-SAVE NOTIFICATION (Phase 1.3)
============================================ */
.checkout-autosave-notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.03));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    animation: autosaveFadeIn 0.4s ease-out;
    font-size: 0.9rem;
    color: var(--checkout-accent);
}

.checkout-autosave-notification i { font-size: 1.1rem; }

.checkout-autosave-notification .autosave-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--checkout-accent);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.checkout-autosave-notification .autosave-dismiss:hover { opacity: 1; }

@keyframes autosaveFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   TRUST BADGES & MICRO-ANIMATIONS (Phase 1.4)
============================================ */
@keyframes lockPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

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

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

.checkout-trust-badges {
    background: var(--checkout-bg-card);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: var(--checkout-shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-trust-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
    animation: trustFadeSlideIn 0.5s ease-out both;
}

.checkout-trust-badge:nth-child(1) { animation-delay: 0.1s; }
.checkout-trust-badge:nth-child(2) { animation-delay: 0.25s; }
.checkout-trust-badge:nth-child(3) { animation-delay: 0.4s; }

.checkout-trust-badge:last-child { margin-bottom: 0; }

.checkout-trust-badge:hover { background: var(--checkout-bg); }

.checkout-trust-badge-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.checkout-trust-badge-icon.shield {
    background: linear-gradient(135deg, var(--checkout-success), #059669);
}

.checkout-trust-badge-icon.ssl {
    background: linear-gradient(135deg, var(--checkout-accent), var(--checkout-purple));
}

.checkout-trust-badge-icon.orders {
    background: linear-gradient(135deg, var(--checkout-warning), #d97706);
}

.checkout-trust-badge:hover .checkout-trust-badge-icon.shield i { animation: shieldBounce 0.6s ease; }
.checkout-trust-badge:hover .checkout-trust-badge-icon.ssl i { animation: lockPulse 0.6s ease; }

.checkout-trust-badge-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--checkout-text);
    line-height: 1.3;
}

.checkout-trust-badge-text small {
    display: block;
    font-weight: 400;
    color: var(--checkout-text-secondary);
    font-size: 0.78rem;
    margin-top: 2px;
}

.checkout-btn-finalizar .fa-lock { animation: lockPulse 2.5s infinite ease-in-out; }

.checkout-politicas-item:hover i { animation: shieldBounce 0.5s ease; }

/* ============================================
   FLOATING LABELS (Phase 2.1)
============================================ */
.floating-label {
    position: relative;
}

.floating-label .checkout-label-premium {
    position: absolute;
    top: 50%;
    left: 1.25rem;
    transform: translateY(-50%);
    margin-bottom: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 1;
    background: transparent;
    padding: 0 4px;
    font-size: 0.85rem;
}

.floating-label .checkout-input-premium {
    padding-top: 1.2rem;
    padding-bottom: 0.8rem;
}

.floating-label .checkout-input-premium::placeholder {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.floating-label .checkout-input-premium:focus::placeholder {
    opacity: 0.5;
    transition-delay: 0.1s;
}

/* Floated state */
.floating-label .checkout-input-premium:focus ~ .checkout-label-premium,
.floating-label .checkout-input-premium.has-value ~ .checkout-label-premium,
.floating-label.label-floated .checkout-label-premium {
    top: -0.5rem;
    transform: translateY(0);
    font-size: 0.75rem;
    background: var(--checkout-bg-card);
    color: var(--checkout-accent);
    padding: 0 6px;
    left: 1rem;
}

.floating-label .checkout-input-premium:focus ~ .checkout-label-premium i,
.floating-label .checkout-input-premium.has-value ~ .checkout-label-premium i,
.floating-label.label-floated .checkout-label-premium i {
    font-size: 0.7rem;
}

/* Floating textarea */
.floating-textarea .checkout-label-premium {
    top: 1.1rem;
    transform: none;
}

.floating-textarea .checkout-input-premium:focus ~ .checkout-label-premium,
.floating-textarea .checkout-input-premium.has-value ~ .checkout-label-premium,
.floating-textarea.label-floated .checkout-label-premium {
    top: -0.5rem;
    transform: translateY(0);
    font-size: 0.75rem;
    background: var(--checkout-bg-card);
    color: var(--checkout-accent);
    padding: 0 6px;
    left: 1rem;
}

/* Valid/Invalid label colors */
.floating-label.field-valid .checkout-input-premium:focus ~ .checkout-label-premium,
.floating-label.field-valid .checkout-input-premium.has-value ~ .checkout-label-premium,
.floating-label.field-valid.label-floated .checkout-label-premium {
    color: var(--checkout-success);
}

.floating-label.field-invalid .checkout-input-premium:focus ~ .checkout-label-premium,
.floating-label.field-invalid .checkout-input-premium.has-value ~ .checkout-label-premium,
.floating-label.field-invalid.label-floated .checkout-label-premium {
    color: var(--checkout-danger);
}

/* ============================================
   INLINE VALIDATION (Phase 2.2)
============================================ */
.field-valid .checkout-input-premium {
    border-color: var(--checkout-success);
    background: rgba(16, 185, 129, 0.03);
}

.field-invalid .checkout-input-premium {
    border-color: var(--checkout-danger);
    background: rgba(239, 68, 68, 0.03);
}

.checkout-field-feedback {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
    animation: feedbackFadeIn 0.25s ease-out;
}

.checkout-field-feedback.valid {
    color: var(--checkout-success);
}

.checkout-field-feedback.invalid {
    color: var(--checkout-danger);
}

@keyframes feedbackFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fieldShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px); }
    30% { transform: translateX(5px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
}

.field-shake {
    animation: fieldShake 0.5s ease-in-out;
}

/* ============================================
   SECTION BADGES - FIELD INDICATORS (Phase 3.2)
============================================ */
.checkout-seccion-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: auto;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.checkout-seccion-badge.badge-incomplete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--checkout-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.checkout-seccion-badge.badge-partial {
    background: rgba(245, 158, 11, 0.1);
    color: var(--checkout-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.checkout-seccion-badge.badge-complete {
    background: rgba(16, 185, 129, 0.1);
    color: var(--checkout-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.checkout-btn-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--checkout-primary);
    color: white;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.checkout-btn-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--checkout-primary);
}

.checkout-btn-finalizar:hover .checkout-btn-tooltip {
    opacity: 1;
}

/* ============================================
   FLOATING ACTION BAR - MOBILE (Phase 3.3)
============================================ */
@keyframes slideUpBar {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.checkout-floating-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--checkout-bg-card);
    padding: 0.875rem 1.25rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    z-index: 100;
    display: none;
    animation: slideUpBar 0.3s ease-out;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-floating-bar-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.checkout-floating-bar-total {
    flex-shrink: 0;
}

.checkout-floating-bar-total-label {
    font-size: 0.72rem;
    color: var(--checkout-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.checkout-floating-bar-total-value {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--checkout-accent), var(--checkout-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.checkout-floating-bar-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--checkout-accent) 0%, var(--checkout-purple) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--checkout-transition);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.checkout-floating-bar-btn:active {
    transform: scale(0.98);
}

@media (max-width: 991px) {
    .checkout-floating-bar {
        display: block;
    }

    body {
        padding-bottom: 80px;
    }

    /* Hide original submit button on mobile - floating bar replaces it */
    .checkout-btn-finalizar {
        display: none;
    }
}

@media (min-width: 992px) {
    .checkout-floating-bar {
        display: none;
    }
}

/* ============================================
   ACCORDION SECTIONS - MOBILE (Phase 4.1)
============================================ */
.checkout-accordion-header {
    display: none;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: inherit;
}

.checkout-accordion-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    color: var(--checkout-text-secondary);
    font-size: 0.85rem;
}

.checkout-accordion-content {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 2000px;
    opacity: 1;
}

@media (max-width: 991px) {
    .checkout-accordion-header {
        display: flex;
        align-items: center;
        gap: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .checkout-accordion-section .checkout-seccion-titulo {
        display: none;
    }

    .checkout-accordion-section.collapsed .checkout-accordion-content {
        max-height: 0;
        opacity: 0;
        padding: 0;
        margin: 0;
        overflow: hidden;
    }

    .checkout-accordion-section.collapsed .checkout-accordion-arrow {
        transform: rotate(-90deg);
    }

    .checkout-accordion-section.collapsed {
        padding-bottom: 0;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
}

@media (min-width: 992px) {
    .checkout-accordion-header {
        display: none;
    }

    .checkout-accordion-content {
        max-height: none;
        opacity: 1;
        overflow: visible;
    }
}

/* ============================================
   KEYBOARD NAVIGATION (Phase 4.2)
============================================ */
.checkout-skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--checkout-accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 12px 12px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 10000;
    transition: top 0.2s ease;
    text-decoration: none;
}

.checkout-skip-link:focus {
    top: 0;
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--checkout-accent);
    outline-offset: 2px;
}

.checkout-input-premium:focus-visible {
    outline: none;
}

.checkout-metodo-card:focus-visible {
    outline: 3px solid var(--checkout-accent);
    outline-offset: 2px;
    border-color: var(--checkout-accent);
}

/* Fix radio buttons focusability */
.checkout-metodo-pago input[type="radio"] {
    width: 1px;
    height: 1px;
}

/* ============================================
   MOBILE MAP OPTIMIZATION (Phase 4.3)
============================================ */
.checkout-map-expand-btn {
    display: none;
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--checkout-bg-card);
    border: 2px solid var(--checkout-accent);
    color: var(--checkout-accent);
    padding: 0.5rem 0.875rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 500;
    box-shadow: var(--checkout-shadow-md);
    transition: all 0.2s;
}

.checkout-map-expand-btn:hover {
    background: var(--checkout-accent);
    color: white;
}

.checkout-map-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

.checkout-map-fullscreen-close {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: var(--checkout-bg-card);
    border: 2px solid var(--checkout-danger);
    color: var(--checkout-danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10000;
    box-shadow: var(--checkout-shadow-lg);
    transition: all 0.2s;
}

.checkout-map-fullscreen-close:hover {
    background: var(--checkout-danger);
    color: white;
}

body.map-fullscreen-active { overflow: hidden; }

@media (max-width: 991px) {
    .checkout-map-container {
        position: relative;
    }

    #mapa-direccion {
        height: 200px;
    }

    .checkout-map-expand-btn {
        display: block;
    }

    .map-search-btn,
    .map-gps-btn {
        min-height: 48px;
    }
}

@media (min-width: 992px) {
    .checkout-map-expand-btn {
        display: none;
    }
}

/* ============================================
   MODAL RESPONSIVE - MOBILE FULL SCREEN
============================================ */

/* Smooth transition for modal open/close */
.login-modal-container {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

/* Body scroll lock when modal is open */
html.modal-open,
body.modal-open {
    overflow: hidden;
    height: 100%;
}

/* Password strength meter */
.password-strength-meter {
    height: 4px;
    border-radius: 2px;
    background: var(--checkout-bg);
    margin-top: 8px;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.password-strength-fill {
    height: 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-fill[data-strength="0"] { width: 0%; }
.password-strength-fill[data-strength="1"] { width: 25%; background: #ef4444; }
.password-strength-fill[data-strength="2"] { width: 50%; background: #f59e0b; }
.password-strength-fill[data-strength="3"] { width: 75%; background: #3b82f6; }
.password-strength-fill[data-strength="4"] { width: 100%; background: #10b981; }

.password-strength-text {
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 4px;
    text-align: right;
    transition: color 0.3s ease;
}

.password-strength-text[data-strength="1"] { color: #ef4444; }
.password-strength-text[data-strength="2"] { color: #f59e0b; }
.password-strength-text[data-strength="3"] { color: #3b82f6; }
.password-strength-text[data-strength="4"] { color: #10b981; }

/* Modal input field valid/invalid states */
.login-form-input.input-valid {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.04);
}

.login-form-input.input-invalid {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.04);
}

.login-field-hint {
    font-size: 0.72rem;
    margin-top: 4px;
    display: none;
    align-items: center;
    gap: 4px;
}

.login-field-hint.visible {
    display: flex;
}

.login-field-hint.hint-error {
    color: #ef4444;
}

.login-field-hint.hint-success {
    color: #10b981;
}

/* Swipe indicator for mobile modals */
.modal-swipe-indicator {
    display: none;
    width: 40px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.4);
    margin: 0 auto 0.75rem;
}

/* ---- TABLET (max-width: 768px) ---- */
@media (max-width: 768px) {
    .login-modal-overlay {
        padding: 1rem;
    }

    .login-modal-container {
        max-width: 100%;
        border-radius: 20px;
    }

    .login-modal-header {
        padding: 1rem 1.25rem;
    }

    .login-modal-title {
        font-size: 1.35rem;
    }

    .login-modal-body {
        padding: 1.25rem;
    }

    .login-form-group {
        margin-bottom: 1rem;
    }
}

/* ---- MOBILE FULL SCREEN (max-width: 576px) ---- */
@media (max-width: 576px) {
    .login-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .login-modal-overlay.active {
        align-items: flex-end;
    }

    .login-modal-container {
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        min-height: 60vh;
        border-radius: 24px 24px 0 0;
        display: flex;
        flex-direction: column;
        animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes modalSlideUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .modal-swipe-indicator {
        display: block;
    }

    .login-modal-header {
        padding: 0.85rem 1rem;
        flex-shrink: 0;
        border-radius: 24px 24px 0 0;
        padding-top: calc(env(safe-area-inset-top, 0px) + 0.85rem);
    }

    .login-modal-title {
        font-size: 1.2rem;
        font-weight: 800;
    }

    .login-modal-subtitle {
        font-size: 0.8rem;
    }

    .login-modal-close {
        width: 40px;
        height: 40px;
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.2rem;
    }

    .login-modal-body {
        padding: 1rem 1rem calc(env(safe-area-inset-bottom, 0px) + 1rem);
        overflow-y: auto;
        flex: 1;
        -webkit-overflow-scrolling: touch;
    }

    .login-form-group {
        margin-bottom: 0.85rem;
    }

    .login-form-label {
        font-size: 0.72rem;
        margin-bottom: 0.35rem;
    }

    /* Prevent iOS zoom on focus - must be >= 16px */
    .login-form-input {
        font-size: 16px;
        padding: 0.75rem 0.9rem 0.75rem 38px;
        border-radius: 10px;
    }

    .login-form-btn {
        padding: 0.85rem;
        font-size: 0.9rem;
        border-radius: 10px;
        min-height: 48px;
        position: sticky;
        bottom: 0;
        z-index: 2;
    }

    .login-footer-text {
        margin-top: 0.75rem;
        font-size: 0.85rem;
        padding-bottom: 0.5rem;
    }

    /* Username chips responsive */
    .username-chip {
        padding: 6px 10px;
        font-size: 11px;
    }

    .btn-generar-username {
        padding: 4px 8px;
        font-size: 10px;
    }
}

