﻿/* ===== PRODUCT DETAIL STYLES ===== */
.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

.breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

    .breadcrumb a {
        color: #0078d4;
        text-decoration: none;
    }

        .breadcrumb a:hover {
            text-decoration: underline;
        }

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 25px;
}

/* ===== IMAGE GALLERY ===== */
.image-gallery {
    display: flex;
    gap: 16px;
    height: fit-content;
}

.main-image {
    width: 100%;
    min-height: 400px;
    order: 2;
    flex: 1;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: crosshair;
}

    .main-image img {
        width: 100%;
        height: 100%;
        object-fit: scale-down;
        display: block;
        transition: opacity 0.3s ease;
    }

        .main-image img.changing {
            opacity: 0.5;
        }

/* Lente que sigue el cursor */
/* Cambio: Tamaños a porcentuales para responsividad */
.image-zoom-lens {
    position: absolute !important;
    border: 2px solid #0078d4 !important;
    width: 20% !important; /* Antes 150px fijo */
    height: 20% !important;
    min-width: 100px !important; /* Límite mínimo para usabilidad */
    min-height: 100px !important;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none !important;
    background-color: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(2px);
    box-shadow: 0 0 10px rgba(0, 120, 212, 0.5) !important;
    z-index: 10 !important;
    display: block !important;
}

/* Resultado del zoom - la imagen ampliada */
/* Cambio: Tamaños a porcentuales y ajustes en posición */
.image-zoom-result {
    position: absolute !important;
    right: -105% !important; /* Ajustado para más espacio; antes -420px fijo */
    top: 0 !important;
    width: 80% !important; /* Antes 400px; ahora relativo al contenedor */
    height: 80% !important;
    min-width: 300px !important;
    min-height: 300px !important;
    border: 2px solid #e5e5e5 !important;
    border-radius: 8px !important;
    background-color: white !important;
    background-repeat: no-repeat !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    z-index: 1000 !important;
    pointer-events: none !important;
    display: block !important;
}

    /* Mostrar el zoom cuando está activo */
    .image-zoom-result.active,
    .image-zoom-lens.active {
        opacity: 1;
        visibility: visible;
    }

/* ===== RESPONSIVE ADJUSTMENTS ===== */
/* Cambio: Ajustes más granulares para zoom y main-image */
@media (max-width: 1400px) {
    .image-zoom-result {
        right: auto;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 70%; /* Reducido para medianas */
        height: 70%;
    }
}

/* Ajuste para cuando hay poco espacio a la derecha */
@media (min-width: 769px) and (max-width: 1200px) {
    .image-zoom-result {
        right: auto;
        left: 105%;
        width: 300px;
        height: 300px;
    }
}

/* Indicador visual cuando el zoom está disponible */
/* Cambio: Condicionado a no-mobile via media query */
.main-image::after {
    content: "🔍";
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0.7;
    pointer-events: none;
}

@media (max-width: 768px) {
    .main-image::after {
        display: none;
    }
}

.no-main-image {
    font-size: 64px;
    color: #ccc;
    /* Cambio: Agregado texto accesible */
    text-align: center;
}

/* ===== THUMBNAILS ===== */
.image-thumbnails {
    display: flex;
    flex-direction: column; /* Alineación vertical */
    gap: 8px;
    order: 1; /* Aparece primero a la izquierda */
    max-height: 500px; /* Ajusta según el tamaño de tu imagen principal */
    overflow-y: auto; /* Scroll vertical si hay muchas fotos */
    padding: 4px;
    min-width: 85px; /* Evita que se colapsen */
}

.thumbnail {
    width: 54px;
    height: 54px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    border: 1px solid var(--colorNeutralStroke1);
    transition: border-color 0.3s ease, transform 0.3s ease; /* Agregado scale en hover */
}

    .thumbnail:hover {
        transform: scale(1.05); /* Leve zoom en hover para feedback */
    }

    .thumbnail.active {
        border-color: #0078d4;
        border-width: 2px; /* Cambio: Border más grueso para active */
    }

    .thumbnail img {
        object-fit: scale-down;
    }

    .thumbnail.more-images {
        position: relative;
        background: rgba(0, 0, 0, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .thumbnail.more-images img {
            opacity: 0.3; /* Oscurece la imagen de fondo */
        }

.thumbnail-overlay {
    position: absolute;
    color: white;
    font-weight: bold;
    font-size: 18px;
    z-index: 2;
}

/* Modal Estilo Básico */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    padding: 40px;
    overflow-y: auto;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

    .modal-grid img {
        width: 100%;
        border-radius: 8px;
        cursor: pointer;
        transition: transform 0.2s;
    }

        .modal-grid img:hover {
            transform: scale(1.05);
        }

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .image-zoom-lens,
    .image-zoom-result {
        display: none !important;
    }

    .image-gallery {
        flex-direction: column;
    }

    .image-thumbnails {
        flex-direction: row; /* Volver a horizontal en móvil */
        order: 2; /* Poner debajo de la imagen */
        overflow-x: auto;
        min-width: auto;
    }

    .main-image {
        cursor: default;
        overflow: hidden;
        order: 1;
        /* Cambio: Min-height reducido para mobile */
        min-height: 250px;
        aspect-ratio: 1 / 1; /* Mantenido para consistencia */
    }

        /* Alternativa: permitir zoom táctil en móviles */
        .main-image img {
            transition: transform 0.3s ease;
            touch-action: pinch-zoom; /* Cambio: Habilita pinch-zoom nativo */
        }

            .main-image img:active {
                transform: scale(1.5);
            }
}

/* ===== PRODUCT INFO ===== */
.product-info {
    padding: 24px;
    background: #fff;
    border-left: 1px solid #e5e5e5;
}

.product-header {
    margin-bottom: 24px;
}

/* NUEVA CLASE: brand-display */
.brand-display {
    color: #0078d4;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.product-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 16px 0;
    color: var(--neutral-foreground-rest);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.stars {
    color: #ffa500;
    font-size: 18px;
}

.rating-text {
    font-size: 14px;
    color: #666;
}

/* ===== PRICING ===== */
.pricing-section {
    background: #fff; /* Fondo blanco, igual que el contenedor */
    border-radius: 8px;
    margin-bottom: 24px;
}

.condition {
    color: #999999;
    font-weight: 300;
}

.price-container {
    margin-bottom: 16px;
}

.current-price {
    font-size: 32px;
    font-weight: 300;
    color: #333333;
    margin: 0;
}

.original-price {
    font-size: 18px;
    color: #666;
    font-weight: 300;
    text-decoration: line-through;
    margin: 8px 0;
    margin-right: 5px;
}

/* NUEVAS CLASES para precio */
.discount-price {
    font-size: 32px;
    font-weight: 600;
    color: #dc3545;
}

.regular-price {
    font-size: 32px;
    font-weight: 600;
    color: #333;
}

.discount-badge {
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    vertical-align: middle;
}

/* NUEVA CLASE para cuotas */
.installments-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--colorGreen1);
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
}

    .installments-info i {
        font-size: 16px;
    }

.shipping-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--colorGreen1);
    font-weight: 500;
}

/* ===== VARIANTES ===== */
.variants-section {
    margin-bottom: 24px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
}

.variants-title {
    font-size: 14px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.55);
    margin: 0 0 12px 0;
}

.selected-variant-name {
    color: rgba(0, 0, 0, 0.9);
    font-weight: 600;
}

.variants-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: #d1d1d1 transparent;
}

    .variants-thumbnails::-webkit-scrollbar {
        height: 6px;
    }

    .variants-thumbnails::-webkit-scrollbar-track {
        background: transparent;
    }

    .variants-thumbnails::-webkit-scrollbar-thumb {
        background: #d1d1d1;
        border-radius: 3px;
    }

        .variants-thumbnails::-webkit-scrollbar-thumb:hover {
            background: #b1b1b1;
        }

.variant-thumbnail {
    position: relative;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border: 1.5px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .variant-thumbnail:hover:not(.out-of-stock) {
        border-color: #3483fa;
        transform: scale(1.05);
    }

    .variant-thumbnail.selected {
        border-color: #3483fa;
        border-width: 2px;
        box-shadow: 0 0 0 1px #3483fa;
    }

    .variant-thumbnail.out-of-stock {
        opacity: 0.4;
        cursor: not-allowed;
        background: #f5f5f5;
    }

    .variant-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.variant-no-image {
    font-size: 20px;
    color: #999;
}

.variant-check {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: #3483fa;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.variant-no-stock {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 600;
    color: #666;
    text-align: center;
    padding: 2px;
    line-height: 1.1;
}

.variant-selected-info {
    margin-top: 12px;
    font-size: 13px;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stock-available {
    color: #28a745;
    font-weight: 500;
}

.stock-unavailable {
    color: #dc3545;
    font-weight: 500;
}

/* ===== PRODUCT ACTIONS ===== */
.product-actions {
    margin-bottom: 32px;
}

.add-to-cart-section .input-group {
    max-width: 150px;
    margin-bottom: 12px;
}

.add-to-cart-btn {
    width: 100%;
}

.custom-btn {
    display: flex;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    text-align: left;
    max-width: 500px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

    .custom-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
        background-color: #1ea854;
    }

body.high-contrast-mode .custom-btn {
    -webkit-text-decoration: none !important;
    text-decoration: none !important;
}

    body.high-contrast-mode .custom-btn:hover {
        color: var(--colorNeutralForegroundInverted) !important;
    }

.btn-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.whatsapp-icon {
    font-size: 28px;
    margin-top: 3px;
}

.btn-text {
    flex: 1;
}

.btn-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.btn-steps {
    font-size: 0.85rem;
    line-height: 1.6;
}

    .btn-steps li {
        margin-bottom: 5px;
        padding-left: 5px;
    }

        .btn-steps li:before {
            content: "•";
            color: #a8e6a8;
            font-weight: bold;
            display: inline-block;
            width: 1em;
            margin-left: -1em;
        }

.mercado-lider-card {
    border: 2px solid #4CAF50;
    border-radius: 12px;
    padding: 2rem;
    background-color: #f8fff8;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
    width: 100%;
    margin: 2rem auto;
}

.medal-icon {
    width: 45px;
    height: 45px;
    margin-right: 15px;
}

.lider-text {
    color: var(--colorGreen1);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-mercado-libre {
    background-color: #2e7d32;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    color: white;
    transition: all 0.3s ease;
    width: 100%;
}

    .btn-mercado-libre:hover {
        background-color: #1b5e20;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(46, 125, 50, 0.3);
    }

.card-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== TABS ===== */
.product-tabs {
    border-top: 1px solid #e5e5e5;
    padding-top: 32px;
}

.tab-navigation {
    display: flex;
    gap: 32px;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-button {
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

    .tab-button.active {
        color: #0078d4;
        border-bottom-color: #0078d4;
    }

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

.description-content {
    line-height: 1.6;
    color: var(--neutral-foreground-rest);
}

.specifications-table {
    width: 100%;
    border-collapse: collapse;
}

    .specifications-table th,
    .specifications-table td {
        padding: 12px;
        text-align: left;
        border-bottom: 1px solid #e5e5e5;
    }

    .specifications-table th {
        background: #f8f9fa;
        font-weight: 500;
        width: 200px;
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 1020px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .image-gallery {
        justify-self: center;
        position: static;
        width: 75svw;
    }

    .main-image {
        min-height: 250px;
    }

    .product-title {
        font-size: 24px;
    }

    .current-price {
        font-size: 28px;
    }

    .discount-price,
    .regular-price {
        font-size: 28px;
    }

    .variant-thumbnail {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .variants-title {
        font-size: 13px;
    }

    .tab-navigation {
        gap: 16px;
        padding-bottom: 8px;
    }

    .tab-button {
        white-space: nowrap;
        padding: 12px 8px;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Estilos para los botones de variantes */
.variant-thumbnail {
    background: none;
    border: 1.5px solid #e5e5e5;
    padding: 0;
    cursor: pointer;
}

    .variant-thumbnail:focus-visible {
        outline: 2px solid #3483fa;
        outline-offset: 2px;
    }

    .variant-thumbnail.out-of-stock,
    .variant-thumbnail:disabled {
        cursor: not-allowed;
        opacity: 0.5;
    }

/* NUEVO: Contenedor de Tabs con fondo */
.product-tabs-reviews-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

.product-tabs-container {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.tab-navigation {
    display: flex;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
    padding: 0 20px;
}

.tab-button {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    color: #666;
    transition: all 0.3s ease;
}

    .tab-button:hover {
        color: #333;
    }

    .tab-button.active {
        color: #3483fa;
        font-weight: 600;
    }

        .tab-button.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: #3483fa;
        }

.tabs-content-wrapper {
    padding: 30px;
}

/* Sistema de Reviews */
.reviews-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-top: 20px;
}

.reviews-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.average-rating {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.rating-number {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.stars-summary {
    font-size: 24px;
    margin: 10px 0;
}

.total-reviews {
    color: #666;
    font-size: 14px;
}

.ratings-distribution {
    margin-top: 20px;
}

    .ratings-distribution h4 {
        font-size: 16px;
        margin-bottom: 15px;
        color: #333;
    }

.distribution-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

    .distribution-item .stars {
        width: 80px;
        color: #ffa500;
        font-size: 12px;
    }

.distribution-bar {
    flex: 1;
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    margin: 0 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #ffa500;
    border-radius: 4px;
}

.distribution-item .percentage {
    width: 40px;
    text-align: right;
    color: #666;
}

.reviews-list h3 {
    margin-bottom: 20px;
    color: #333;
}

.reviews-sort {
    margin-bottom: 20px;
    max-width: 200px;
}

.review-item {
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 0;
}

    .review-item:last-child {
        border-bottom: none;
    }

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviewer-name {
    font-weight: 500;
    color: #333;
}

.review-rating {
    color: #ffa500;
}

.review-date {
    color: #666;
    font-size: 14px;
}

.review-content {
    color: #333;
    line-height: 1.6;
}

.add-review-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.specifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.specification-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.specification-label {
    color: #555;
    font-size: 0.9rem;
}

.specification-value {
    color: #333;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .reviews-container {
        grid-template-columns: 1fr;
    }

    .tab-navigation {
        flex-wrap: wrap;
        padding: 0;
    }

    .tab-button {
        flex: 1;
        min-width: 120px;
        padding: 12px 15px;
        font-size: 14px;
    }

    .tabs-content-wrapper {
        padding: 20px 15px;
    }

    .installments-info {
        font-size: 13px;
    }

    .specifications-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================= */
/* TABS DE BOOTSTRAP (Reviews y Preguntas) */
/* ========================================= */

/* Contenedor principal de interacciones */
.product-interactions {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 24px;
    margin-top: 32px;
}

    /* Tabs navigation de Bootstrap */
    .product-interactions .nav-tabs {
        border-bottom: 2px solid #dee2e6;
        margin-bottom: 0;
    }

    .product-interactions .nav-item {
        margin-bottom: -2px;
    }

    .product-interactions .nav-link {
        color: #6c757d;
        border: none;
        border-bottom: 3px solid transparent;
        padding: 0.75rem 1.5rem;
        font-weight: 500;
        transition: all 0.3s ease;
        background: transparent;
    }

        .product-interactions .nav-link:hover {
            color: #007bff;
            border-bottom-color: #007bff;
            background: transparent;
        }

        .product-interactions .nav-link.active {
            color: #007bff;
            background-color: transparent;
            border-bottom-color: #007bff;
            border-top: none;
            border-left: none;
            border-right: none;
        }

    /* Tab content de Bootstrap - IMPORTANTE */
    .product-interactions .tab-content {
        display: block !important; /* Siempre visible */
        padding-top: 20px;
    }

    .product-interactions .tab-pane {
        display: none; /* Ocultar por defecto */
        opacity: 0;
        transition: opacity 0.3s ease;
    }

        .product-interactions .tab-pane.active {
            display: block !important; /* Mostrar cuando esté activo */
            opacity: 1;
        }

        .product-interactions .tab-pane.fade {
            opacity: 0;
            transition: opacity 0.15s linear;
        }

            .product-interactions .tab-pane.fade.show {
                opacity: 1;
            }

/* Formularios de creación */
.create-review-form,
.create-question-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

    .create-review-form h5,
    .create-question-form h5 {
        margin-bottom: 1.25rem;
        color: #333;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .create-review-form .form-group,
    .create-question-form .form-group {
        margin-bottom: 1rem;
    }

    .create-review-form .form-label,
    .create-question-form .form-label {
        font-weight: 500;
        margin-bottom: 0.5rem;
        display: block;
        color: #495057;
    }

/* Interacciones (Reviews y Preguntas) */
.interaction-item {
    border: 1px solid #e0e0e0;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

    .interaction-item:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .interaction-item.review {
        border-left: 4px solid #28a745;
    }

    .interaction-item.question {
        border-left: 4px solid #007bff;
    }

.interaction-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

    .user-info strong {
        color: #333;
        font-weight: 600;
    }

.rating-stars {
    color: #ffc107;
    font-size: 1rem;
}

    .rating-stars i {
        margin-right: 2px;
    }

.interaction-date {
    color: #6c757d;
    font-size: 0.875rem;
}

.interaction-content {
    color: #333;
    line-height: 1.6;
    margin-top: 0.75rem;
}

    .interaction-content p {
        margin: 0;
    }

/* Replies (Respuestas) */
.replies-container {
    margin-top: 1.25rem;
    margin-left: 2rem;
    border-left: 3px solid #e9ecef;
    padding-left: 1.5rem;
}

.reply-item {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

    .reply-item:last-child {
        margin-bottom: 0;
    }

.admin-reply {
    background-color: #e7f3ff;
    border-left: 3px solid #007bff;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

    .reply-header strong {
        color: #333;
        font-weight: 600;
    }

.reply-date {
    color: #6c757d;
    font-size: 0.813rem;
}

.reply-content {
    color: #495057;
    line-height: 1.5;
}

    .reply-content p {
        margin: 0;
    }

/* Badges */
.badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    display: inline-block;
}

.badge-success {
    background-color: #28a745;
    color: #fff;
}

.badge-primary {
    background-color: #007bff;
    color: #fff;
}

/* Rating Input (Estrellas para review) */
.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

    .rating-input input {
        display: none;
    }

    .rating-input label {
        font-size: 2rem;
        color: #ddd;
        cursor: pointer;
        transition: color 0.2s ease;
        line-height: 1;
    }

        .rating-input label:hover,
        .rating-input label:hover ~ label,
        .rating-input input:checked ~ label {
            color: #ffc107;
        }

/* Sin interacciones */
.no-interactions {
    padding: 3rem 1rem;
    text-align: center;
    color: #6c757d;
}

    .no-interactions p {
        margin: 0;
        font-size: 1rem;
    }

/* Alert de login */
.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
}

    .alert-info a {
        color: #0c5460;
        font-weight: 600;
        text-decoration: underline;
    }

        .alert-info a:hover {
            color: #062c33;
        }

/* Toggle de respuestas */
.replies-toggle {
    font-weight: 600;
    color: #007bff;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

    .replies-toggle:hover {
        color: #0056b3;
    }

    .replies-toggle .toggle-icon {
        transition: transform 0.2s ease;
        font-size: 0.875rem;
    }

.replies-section {
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
}

/* Botón de eliminar en modal de detalle */
.reply-detail {
    position: relative;
    padding-right: 3rem; /* Espacio para el botón de eliminar */
}

    .reply-detail .btn-outline-danger {
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .reply-detail:hover .btn-outline-danger {
        opacity: 1;
    }

/* Animación del collapse */
.replies-container.collapsing {
    transition: height 0.35s ease;
}

/* Responsive para interacciones */
@media (max-width: 768px) {
    .product-interactions {
        padding: 16px;
    }

        .product-interactions .nav-link {
            padding: 0.5rem 1rem;
            font-size: 0.9rem;
        }

    .interaction-item {
        padding: 1rem;
    }

    .replies-container {
        margin-left: 1rem;
        padding-left: 1rem;
    }

    .rating-input label {
        font-size: 1.75rem;
    }

    .create-review-form,
    .create-question-form {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .interaction-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-info {
        width: 100%;
    }

    .interaction-date {
        font-size: 0.75rem;
    }
}

/* =======================================================
   MEJORAS DE ACCESIBILIDAD PARA DETALLE DE PRODUCTO
   ======================================================= */

/* 1. Breadcrumbs más legibles */
.breadcrumb a {
    color: var(--color-blue, #2563eb); /* Azul más oscuro (AA) */
    text-decoration: underline; /* Subrayado siempre visible ayuda accesibilidad */
}

    .breadcrumb a:focus-visible {
        outline: 2px solid #fbbf24;
        background-color: #1e293b;
        color: white;
    }

/* 2. Títulos y Precios con alto contraste */
.product-title {
    color: #1f2937; /* Gris muy oscuro casi negro */
    line-height: 1.3;
}

.current-price {
    color: #0f172a; /* Negro azulado para máximo contraste */
}

.original-price {
    color: #566479; /* Gris medio accesible (AA) en vez de #999 */
}

.discount-price {
    color: #dc2626; /* Rojo más oscuro para contraste AA */
}

/* 3. Variantes (Tallas/Colores) Accesibles */
.variant-thumbnail {
    border: 1px solid #94a3b8; /* Borde más visible */
}

    .variant-thumbnail:focus-visible {
        outline: 3px solid #fbbf24 !important; /* Foco amarillo muy visible */
        outline-offset: 2px;
        border-color: #2563eb;
    }

    /* Estado seleccionado más claro */
    .variant-thumbnail.selected {
        border: 2px solid #2563eb;
        box-shadow: 0 0 0 2px #2563eb inset; /* Doble borde visual */
    }

/* Texto de variante seleccionada */
.selected-variant-name {
    color: #1f2937;
    font-weight: 700;
}

/* 4. Tabs de Navegación */
.tab-button {
    color: #4b5563; /* Gris oscuro AA */
}

    .tab-button:focus-visible {
        outline: 2px solid #2563eb;
        background-color: #f1f5f9;
        z-index: 10;
    }

    .tab-button.active {
        color: #2563eb; /* Azul accesible */
        border-bottom-color: #2563eb;
        font-weight: 700;
    }

/* 5. Botones de Acción */
.btn-mercado-libre:focus-visible,
.custom-btn:focus-visible {
    outline: 3px solid #0f172a;
    outline-offset: 2px;
}

/* 6. Especificaciones y Texto */
.specification-label {
    color: #4b5563; /* Gris oscuro accesible */
    font-weight: 600;
}

.specification-value {
    color: #1f2937; /* Casi negro */
}

.description-content {
    color: #374151;
    font-size: 1.05rem; /* Un poco más grande para lectura */
}

/* =======================================================
   MODO ALTO CONTRASTE (AAA) - DETALLE
   ======================================================= */
body.high-contrast-mode #description a {
    color: var(--color-blue-contrast);
}

body.high-contrast-mode .product-detail-grid,
body.high-contrast-mode .product-interactions,
body.high-contrast-mode .reviews-summary,
body.high-contrast-mode .product-tabs-container {
    border: 2px solid #000000;
    box-shadow: none;
    background: #ffffff;
}

body.high-contrast-mode .product-title,
body.high-contrast-mode .current-price,
body.high-contrast-mode .rating-number {
    color: #000000 !important;
    font-weight: 800;
}

body.high-contrast-mode .breadcrumb a {
    color: var(--color-blue-contrast) !important;
    font-weight: 700;
}

/* Botones en alto contraste */
body.high-contrast-mode .custom-btn { /* Botón WhatsApp */
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff;
}

body.high-contrast-mode .btn-mercado-libre {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    font-weight: 800;
    -webkit-text-decoration: none !important;
    text-decoration: none !important;
}

body.high-contrast-mode #galleryModal h2 {
    color: var(--colorNeutralForegroundInverted) !important;
}

/* Variantes en alto contraste */
body.high-contrast-mode .variant-thumbnail {
    border: 2px solid #000000;
}

    body.high-contrast-mode .variant-thumbnail.selected {
        background-color: #000000;
        border-color: #000000;
    }

        body.high-contrast-mode .variant-thumbnail.selected img {
            filter: grayscale(100%) invert(1); /* Invierte imagen seleccionada */
        }
