/* ============================================
   PRODUCTO DETALLE - ESTILOS
   ============================================ */

.detalle-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 24px;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    font-size: 12px;
    color: var(--text-muted);
}

.breadcrumb span {
    color: var(--text-primary);
    font-weight: 500;
}

/* ============================================
   GRID PRINCIPAL - 2 COLUMNAS
   ============================================ */
.detalle-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 15%;
    margin-bottom: 40px;
    align-items: start;
}

/* ============================================
   COLUMNA IZQUIERDA - IMAGEN
   ============================================ */
.detalle-imagen-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detalle-imagen-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detalle-imagen-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}

.detalle-imagen-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 12px;
}

.detalle-imagen-placeholder i {
    font-size: 48px;
}

.detalle-imagen-placeholder span {
    font-size: 14px;
}

.detalle-destacado {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    background: rgba(241, 196, 15, 0.95);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.3);
}

/* Footer de la imagen */
.detalle-imagen-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.imagen-footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.imagen-footer-item i {
    color: var(--text-muted);
    font-size: 14px;
}

.imagen-footer-item.agotado {
    color: #e74c3c;
}

.imagen-footer-item.agotado i {
    color: #e74c3c;
}

/* ============================================
   COLUMNA DERECHA - INFORMACIÓN
   ============================================ */
.detalle-info-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detalle-estado {
    display: flex;
    gap: 10px;
}

.estado-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.estado-badge i {
    font-size: 8px;
}

.estado-badge.activo {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.estado-badge.inactivo {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.detalle-titulo {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.detalle-precio {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-light);
    padding: 8px 0;
}

.detalle-precio .gratis {
    color: #2ecc71;
}

.detalle-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-dark);
    padding: 4px 14px;
    border-radius: 20px;
}

.metadata-item i {
    font-size: 14px;
    color: var(--text-muted);
}

.detalle-descripcion {
    padding: 8px 0;
}

.detalle-descripcion h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detalle-descripcion p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ============================================
   VENDEDOR
   ============================================ */
.detalle-vendedor {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-dark);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.vendedor-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.vendedor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vendedor-avatar i {
    font-size: 24px;
    color: var(--text-muted);
}

.vendedor-info {
    flex: 1;
}

.vendedor-label {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vendedor-nombre {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.vendedor-rol {
    font-size: 12px;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vendedor-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.vendedor-link:hover {
    color: var(--primary-dark);
    gap: 8px;
}

/* ============================================
   ACCIONES
   ============================================ */
.detalle-acciones {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.btn-comprar {
    flex: 1;
    min-width: 160px;
    padding: 14px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.btn-comprar:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-contactar {
    padding: 14px 28px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-contactar:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-registrar {
    padding: 14px 28px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-registrar:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.acciones-propietario {
    display: flex;
    gap: 12px;
    width: 100%;
}

.btn-editar {
    flex: 1;
    padding: 14px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-editar:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-eliminar {
    padding: 14px 28px;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-eliminar:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3);
}

.btn-success {
    padding: 14px 28px;
    background: rgba(60, 231, 103, 0.1);
    color: #11b93b;
    border: 1px solid rgba(60, 231, 103, 0.3);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-success:hover {
    background: #11b93b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(60, 231, 103, 0.3);
}

/* ============================================
   PRODUCTOS RELACIONADOS
   ============================================ */
.seccion-relacionados {
    margin-top: 40px;
}

.seccion-titulo {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.relacionados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.relacionado-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-decoration: none;
    transition: var(--transition);
    display: block;
}

.relacionado-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(108, 59, 224, 0.1);
}

.relacionado-imagen {
    height: 140px;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.relacionado-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.relacionado-imagen i {
    font-size: 32px;
    color: var(--text-muted);
}

.relacionado-info {
    padding: 12px 14px 14px;
}

.relacionado-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.relacionado-precio {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-light);
    margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .detalle-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .detalle-imagen-card {
        max-height: 350px;
        aspect-ratio: auto;
    }

    .detalle-imagen-container {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .detalle-container {
        padding: 0 16px;
        margin: 20px auto;
    }

    .detalle-imagen-card {
        max-height: 280px;
    }

    .detalle-titulo {
        font-size: 22px;
    }

    .detalle-precio {
        font-size: 26px;
    }

    .detalle-imagen-footer {
        grid-template-columns: 1fr 1fr;
    }

    .relacionados-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }

    .detalle-acciones {
        flex-direction: column;
    }

    .btn-comprar,
    .btn-contactar,
    .btn-registrar {
        width: 100%;
        justify-content: center;
    }

    .acciones-propietario {
        flex-direction: column;
    }

    .btn-editar,
    .btn-eliminar {
        width: 100%;
        justify-content: center;
    }

    .detalle-vendedor {
        flex-wrap: wrap;
    }

    .vendedor-link {
        width: 100%;
        justify-content: center;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
    }
}

@media (max-width: 480px) {
    .detalle-imagen-card {
        max-height: 220px;
    }

    .detalle-titulo {
        font-size: 19px;
    }

    .detalle-precio {
        font-size: 22px;
    }

    .detalle-imagen-footer {
        grid-template-columns: 1fr;
    }

    .relacionados-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .relacionado-imagen {
        height: 100px;
    }

    .relacionado-info h4 {
        font-size: 13px;
    }

    .relacionado-precio {
        font-size: 14px;
    }

    .detalle-metadata {
        gap: 8px;
    }

    .metadata-item {
        font-size: 12px;
        padding: 3px 10px;
    }
}

/* ============================================
   MODAL - CONTACTAR VENDEDOR
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.open {
    display: flex;
}

.modal-content.modal-md {
    max-width: 550px;
    width: 95%;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    animation: modalSlide 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlide {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h5 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group .required {
    color: #e74c3c;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 59, 224, 0.1);
}

.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.btn--primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn--outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    background: transparent;
}

.btn--outline:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    background: rgba(108, 59, 224, 0.08);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: 100%;
}

.toast-notification {
    padding: 16px 20px;
    border-radius: 12px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: toastIn 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.toast-success {
    border-left: 4px solid #2ecc71;
}

.toast-success .toast-icon {
    color: #2ecc71;
}

.toast-error {
    border-left: 4px solid #e74c3c;
}

.toast-error .toast-icon {
    color: #e74c3c;
}

.toast-info {
    border-left: 4px solid #3498db;
}

.toast-info .toast-icon {
    color: #3498db;
}

.toast-notification .toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-notification .toast-content {
    flex: 1;
}

.toast-notification .toast-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}

.toast-notification .toast-message {
    font-weight: 400;
    font-size: 14px;
    opacity: 0.9;
}

.toast-notification .toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.toast-notification .toast-close:hover {
    opacity: 1;
    color: var(--text-primary);
}

.toast-notification.toast-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

@media (max-width: 600px) {
    .toast-container {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: 100%;
    }
}


