/* =====================================================
   PRODUCTO DETALLE - ESTILOS ESPECÍFICOS
   ===================================================== */

/* ========== HEADER SIMPLIFICADO ========== */
.header-simple {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateX(-3px);
}

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

/* ========== TOAST NOTIFICATION ========== */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    font-size: 0.9375rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-notification i {
    font-size: 1.25rem;
}

.toast-notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ========== MAIN CONTAINER ========== */
.producto-detalle-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.producto-detalle-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* ========== GALERÍA DE IMÁGENES ========== */
.producto-detalle-gallery {
    position: sticky;
    top: 100px;
}

.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

.gallery-main-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.gallery-arrow:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.gallery-arrow-prev {
    left: 12px;
}

.gallery-arrow-next {
    right: 12px;
}

.gallery-arrow i {
    font-size: 1.5rem;
    color: #475569;
}

.gallery-thumbnails {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gallery-thumbnail {
    width: calc(20% - 10px);
    aspect-ratio: 1;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.gallery-thumbnail:hover {
    border-color: #BF52C8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(191, 82, 200, 0.2);
}

.gallery-thumbnail.active {
    border-color: #BF52C8;
    border-width: 3px;
    box-shadow: 0 4px 12px rgba(191, 82, 200, 0.3);
}

.gallery-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ========== INFORMACIÓN DEL PRODUCTO ========== */
.producto-detalle-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-section {
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-section h3 i {
    color: #BF52C8;
    font-size: 1.25rem;
}

/* ========== TÍTULO Y CÓDIGO ========== */
.producto-titulo {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.producto-codigo,
.producto-categoria {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    color: #64748b;
    margin: 8px 0;
}

.producto-codigo i,
.producto-categoria i {
    color: #BF52C8;
    font-size: 1.125rem;
}

/* ========== DESCRIPCIÓN ========== */
.producto-descripcion {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}

/* ========== PRECIOS ========== */
.precio-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.precio-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.precio-row:last-child {
    border-bottom: none;
}

.precio-label {
    font-size: 0.9375rem;
    color: #64748b;
    font-weight: 500;
}

.precio-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.precio-tachado {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 1.125rem;
}

.precio-row-destacado {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0;
    border: 2px solid #10b981;
}

.precio-row-destacado .precio-value {
    color: #10b981;
    font-size: 1.5rem;
}

.precio-asociado {
    color: #10b981 !important;
}

.precio-mensaje-login {
    margin-top: 12px;
    padding: 12px;
    background: #eff6ff;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    font-size: 0.875rem;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 8px;
}

.precio-mensaje-login i {
    font-size: 1.125rem;
    color: #3b82f6;
}

.precio-mensaje-login a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

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

.precio-iva {
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px 16px;
    margin-top: 8px;
}

.precio-iva .precio-label {
    color: #475569;
}

.precio-iva .precio-value {
    font-size: 1rem;
    color: #64748b;
}

/* ========== PUNTOS BP ========== */
.puntos-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
}

.puntos-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #92400e;
}

.puntos-badge i {
    font-size: 1.75rem;
    color: #f59e0b;
}

/* ========== REEMBOLSO ========== */
.reembolso-section {
    padding: 16px 20px;
}

.reembolso-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
}

.reembolso-si {
    background: #ecfdf5;
    color: #065f46;
    border: 2px solid #10b981;
}

.reembolso-si i {
    color: #10b981;
    font-size: 1.25rem;
}

.reembolso-no {
    background: #fef2f2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

.reembolso-no i {
    color: #ef4444;
    font-size: 1.25rem;
}

/* ========== CARACTERÍSTICAS ========== */
.caracteristicas-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.caracteristicas-lista li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.6;
}

.caracteristicas-lista i {
    color: #10b981;
    font-size: 1.125rem;
    margin-top: 2px;
    min-width: 20px;
}

/* ========== FICHA TÉCNICA ========== */
.ficha-tecnica-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-ficha {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-ver {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
}

.btn-ver:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-descargar {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-descargar:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
}

.ficha-tecnica-no-disponible {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f1f5f9;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.9375rem;
}

.ficha-tecnica-no-disponible i {
    font-size: 1.5rem;
    opacity: 0.5;
}

/* ========== SECCIÓN DE CARRITO ========== */
.cart-section {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 2px solid #BF52C8;
    position: sticky;
    bottom: 20px;
}

.add-to-cart-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quantity-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quantity-control label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quantity-input {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.qty-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: none;
    color: #475569;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

.quantity-input input {
    flex: 1;
    height: 48px;
    text-align: center;
    border: none;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    padding: 0 12px;
}

.quantity-input input:focus {
    outline: none;
}

.btn-add-cart {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #BF52C8 0%, #9333ea 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(191, 82, 200, 0.3);
}

.btn-add-cart:hover {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(191, 82, 200, 0.4);
}

.btn-add-cart:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(191, 82, 200, 0.3);
}

.btn-add-cart i {
    font-size: 1.25rem;
}

/* ========== ANIMACIONES ========== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .producto-detalle-container {
        gap: 40px;
    }

    .gallery-thumbnails {
        gap: 8px;
    }

    .gallery-thumbnail {
        width: calc(20% - 6.4px);
    }
}

@media (max-width: 768px) {
    .producto-detalle-main {
        padding: 20px 16px;
    }

    .producto-detalle-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .producto-detalle-gallery {
        position: static;
    }

    .producto-titulo {
        font-size: 1.5rem;
    }

    .gallery-arrow {
        width: 36px;
        height: 36px;
    }

    .gallery-arrow i {
        font-size: 1.25rem;
    }

    .gallery-thumbnails {
        gap: 8px;
        justify-content: center;
    }

    .gallery-thumbnail {
        width: calc(25% - 6px);
    }

    .info-section {
        padding: 16px;
    }

    .btn-back span {
        display: none;
    }

    .user-guest-text {
        font-size: 0.8125rem;
    }

    .toast-notification {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }

    .ficha-tecnica-actions {
        flex-direction: column;
    }

    .btn-ficha {
        width: 100%;
    }

    .cart-section {
        position: static;
    }
}

@media (max-width: 480px) {
    .producto-titulo {
        font-size: 1.25rem;
    }

    .precio-value {
        font-size: 1.125rem;
    }

    .precio-row-destacado .precio-value {
        font-size: 1.375rem;
    }

    .gallery-thumbnail {
        width: calc(33.333% - 5.33px);
    }

    .btn-add-cart {
        font-size: 1rem;
        padding: 14px 20px;
    }
}