/* Contenedor principal */
.personalizador-playeras-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 20px;
}

.personalizador-header {
    text-align: center;
    margin-bottom: 40px;
}

.personalizador-header h2 {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.personalizador-header p {
    font-size: 1.1rem;
    color: #64748b;
}

/* Wrapper principal - 2 COLUMNAS */
.personalizador-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* COLUMNA 1: Vista Previa + Diseños */
.columna-izquierda {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Panel de Vista Previa */
.vista-previa-panel {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
}

.playera-preview {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 0 auto 20px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.playera-base {
    max-width: 95%;
    max-height: 95%;
    transition: all 0.3s ease;
}

.diseño-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 80%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
    mix-blend-mode: multiply;
}

/* Panel de Diseños */
.disenos-panel {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.disenos-panel h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 1.3rem;
}

/* COLUMNA 2: Controles (Colores + Tallas + Resumen) */
.columna-derecha {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.control-group {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.control-group h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 1.3rem;
}

/* Colores */
.colores-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.color-option:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.color-option.active {
    background: #e0f2fe;
    border-color: #0ea5e9;
}

.color-swatch {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.color-option span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
}

/* Sistema de Tallas */
.selector-tallas {
    margin: 20px 0;
}

.selector-tallas h4 {
    margin: 0 0 15px 0;
    color: #1e293b;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.talla-seleccionada {
    font-size: 0.9rem;
    color: #0ea5e9;
    font-weight: 600;
}

.tallas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.talla-option {
    padding: 12px 5px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-weight: 500;
}

.talla-option:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.talla-option.active {
    border-color: #0ea5e9;
    background: #f0f9ff;
    color: #0ea5e9;
}

/* Resumen del pedido */
.resumen-pedido {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
}

.resumen-pedido h3 {
    margin: 0 0 20px 0;
    font-size: 1.4rem;
}

.resumen-details {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.resumen-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Categorías de diseños */
.categorias-disenos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.categoria-btn {
    background: #e2e8f0;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.categoria-btn:hover {
    background: #cbd5e1;
}

.categoria-btn.active {
    background: #0ea5e9;
    color: white;
}

/* Grid de diseños - 2 COLUMNAS */
.disenos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 750px;
    overflow-y: auto;
    padding-top: 10px;
    padding-right: 10px;
}

.disenos-grid::-webkit-scrollbar {
    width: 6px;
}

.disenos-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.disenos-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.diseno-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: white;
}

.diseno-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.diseno-option.active {
    border-color: #0ea5e9;
    background: #f0f9ff;
    transform: translateY(-2px);
}

.diseno-option img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 10px;
    background: #f8fafc;
    padding: 5px;
}

.diseno-option span {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    color: #475569;
}

/* Estados de disponibilidad */
.color-option.no-disponible {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.color-option.no-disponible .color-swatch {
    opacity: 0.6;
}

.stock-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* Precio extra en diseños */
.precio-extra {
    font-size: 0.85rem;
    color: #c66231;
    font-weight: 600;
    margin-top: -10px;
}

/* Selector de cantidad */
.cantidad-selector {
    margin: 20px 0;
    text-align: center;
}

.cantidad-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
}

.cantidad-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-cantidad {
    background: #e5e7eb;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #374151;
}

.btn-cantidad:hover {
    background: #d1d5db;
    transform: scale(1.05);
}

.btn-cantidad:active {
    transform: scale(0.95);
}

.input-cantidad {
    width: 60px;
    text-align: center;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    background: white;
}

.input-cantidad:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Precio total */
.precio-total {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.precio-base {
    font-size: 1rem;
    opacity: 0.8;
}

.mas {
    font-size: 1.2rem;
    margin: 0 10px;
}

.precio-final {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fbbf24;
    margin-top: 10px;
}

/* Formulario */
.form-agregar-carrito {
    margin-top: 20px;
}

.btn-agregar-carrito {
    background: #22c55e;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 15px;
}

.btn-agregar-carrito:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.nota-importante {
    opacity: 0.9;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .personalizador-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .columna-izquierda {
        order: 1;
    }
    
    .columna-derecha {
        order: 2;
    }
}

@media (max-width: 768px) {
    .personalizador-playeras-container {
        padding: 20px 15px;
    }
    
    .personalizador-header h2 {
        font-size: 2rem;
    }
    
    .playera-preview {
        height: 350px;
    }
    
    .colores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .disenos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tallas-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .diseno-option img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .disenos-grid {
        grid-template-columns: 1fr;
    }
    
    .colores-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tallas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categorias-disenos {
        justify-content: center;
    }
    
    .diseno-option img {
        width: 80px;
        height: 80px;
    }
}