/* =============================================
   1. BREADCRUMB
   ============================================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.breadcrumb-section {
    background: #f5f5f5;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
}

.breadcrumb a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: #e74c3c;
}

.bc-sep {
    color: #bbb;
    font-size: 15px;
    line-height: 1;
}

.breadcrumb .current {
    color: #111;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

/* =============================================
   2. SECCIÓN DETALLE
   ============================================= */
.producto-detalle-section {
    background: #ffffff;
    padding: 48px 0 56px;
}

/* =============================================
   3. GRID 2 COLUMNAS
   ============================================= */
.producto-detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* =============================================
   4. COLUMNA IMAGEN
   ============================================= */
.producto-detalle-imagen {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    padding: 48px 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

/* Patrón diagonal sutil */
.producto-detalle-imagen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 28px,
        rgba(255, 255, 255, 0.018) 28px,
        rgba(255, 255, 255, 0.018) 29px
    );
    pointer-events: none;
}

.badge-top-brand {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 90px;
    height: 90px;
    z-index: 10;
}

.badge-top-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.descuento-badge-grande {
    position: absolute;
    top: 18px;
    left: 18px;
    background: #e74c3c;
    color: #fff;
    font-family: 'Barlow Condensed', 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 900;
    padding: 6px 16px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    z-index: 5;
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.45);
}

.imagen-principal-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.imagen-principal {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.5));
    transition: transform 0.4s ease;
}

.imagen-principal:hover {
    transform: scale(1.05);
}

/* =============================================
   5. COLUMNA INFO
   ============================================= */
.producto-detalle-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fff;
    border-radius: 18px;
    padding: 36px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

/* Marca */
.producto-marca-tag {
    display: inline-block;
    background: #111;
    color: #fff;
    font-family: 'Barlow Condensed', 'Oswald', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-radius: 4px;
    align-self: flex-start;
}

/* Título */
.producto-detalle-titulo {
    font-family: 'Barlow Condensed', 'Oswald', sans-serif;
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 900;
    color: #111;
    line-height: 1.15;
    margin: 0;
    letter-spacing: 0.3px;
}

/* SKU */
.producto-modelo {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.producto-modelo strong {
    color: #555;
}

/* Banner descuento */
.descuento-banner-detalle {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    padding: 13px 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(106, 17, 203, 0.3);
}

.descuento-banner-detalle .descuento-text {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    flex: 1;
}

.descuento-banner-detalle .descuento-porcentaje {
    background: #fff;
    color: #6a11cb;
    padding: 6px 18px;
    border-radius: 20px;
    font-family: 'Barlow Condensed', 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 900;
    flex-shrink: 0;
}

/* Descripción */
.producto-detalle-descripcion {
    background: #f9f9f9;
    border-left: 3px solid #e74c3c;
    border-radius: 0 8px 8px 0;
    padding: 16px 18px;
}

.producto-detalle-descripcion h3 {
    font-family: 'Barlow Condensed', 'Oswald', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 8px;
}

.producto-detalle-descripcion p {
    font-size: 14px;
    color: #444;
    line-height: 1.65;
    margin: 0;
}

/* Stock */
.producto-stock-info {
    font-size: 13px;
    font-weight: 700;
}

.stock-ok {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1a7a3a;
    background: #eafaf1;
    border: 1.5px solid #a9dfbf;
    padding: 8px 16px;
    border-radius: 8px;
}

.stock-ok svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.stock-cantidad {
    font-weight: 500;
    color: #2d8a50;
    font-size: 12px;
}

.stock-alerta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #c0392b;
    background: #fdedec;
    border: 1.5px solid #f5b7b1;
    padding: 8px 16px;
    border-radius: 8px;
}

.stock-alerta svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.stock-agotado {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    background: #f5f5f5;
    border: 1.5px solid #ddd;
    padding: 8px 16px;
    border-radius: 8px;
}

.stock-agotado svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Precio */
.producto-detalle-precio {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px 20px 16px;
    border: 1.5px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.precio-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.precio-label-det {
    font-size: 12px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.precio-tachado-detalle {
    color: #bbb;
    text-decoration: line-through;
    font-size: 18px;
    font-weight: 600;
}

.precio-grande-detalle {
    font-family: 'Barlow Condensed', 'Oswald', sans-serif;
    font-size: 38px;
    font-weight: 900;
    color: #1a7a3a;
    line-height: 1;
}

.precio-row.oferta .precio-label-det {
    color: #1a7a3a;
}

.ahorro-tag {
    font-size: 12px;
    font-weight: 700;
    color: #e74c3c;
    margin-top: 4px;
    letter-spacing: 0.2px;
}

/* =============================================
   6. BOTONES DE ACCIÓN - VERSIÓN MEJORADA
   ============================================= */
.producto-acciones {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

/* Estilo base común para todos los botones */
.producto-acciones .btn-agregar-carrito,
.producto-acciones .btn-comprar-detalle,
.producto-acciones .btn-consultar-detalle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: 'Barlow Condensed', 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    overflow: hidden;
}

/* Iconos dentro de botones */
.producto-acciones svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

/* =============================================
   BOTÓN AGREGAR AL CARRITO
   ============================================= */
.btn-agregar-carrito {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-agregar-carrito::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-agregar-carrito:hover::before {
    width: 300px;
    height: 300px;
}

.btn-agregar-carrito:hover {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-agregar-carrito:active {
    transform: translateY(0);
}

.btn-agregar-carrito svg {
    stroke: #fff;
    stroke-width: 1.5;
}

.btn-agregar-carrito:hover svg {
    transform: scale(1.05);
}

/* =============================================
   BOTÓN COMPRAR POR WHATSAPP
   ============================================= */
.btn-comprar-detalle {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-comprar-detalle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-comprar-detalle:hover::before {
    width: 300px;
    height: 300px;
}

.btn-comprar-detalle:hover {
    background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.btn-comprar-detalle:active {
    transform: translateY(0);
}

.btn-comprar-detalle svg {
    fill: #fff;
}

.btn-comprar-detalle:hover svg {
    transform: scale(1.05);
}

/* =============================================
   BOTÓN CONSULTAR DISPONIBILIDAD
   ============================================= */
.btn-consultar-detalle {
    background: transparent;
    color: #128c7e;
    border: 1.5px solid #128c7e;
    box-shadow: none;
}

.btn-consultar-detalle:hover {
    background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.2);
    border-color: transparent;
}

.btn-consultar-detalle:active {
    transform: translateY(0);
}

.btn-consultar-detalle svg {
    stroke: #128c7e;
    stroke-width: 1.5;
}

.btn-consultar-detalle:hover svg {
    stroke: #fff;
    transform: scale(1.05);
}

/* =============================================
   BOTÓN AGOTADO
   ============================================= */
.btn-agotado-detalle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    background: #f0f0f0;
    color: #aaa;
    border: 1px solid #e0e0e0;
    font-family: 'Barlow Condensed', 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-agotado-detalle svg {
    width: 18px;
    height: 18px;
    stroke: #aaa;
    stroke-width: 1.5;
}

/* =============================================
   VARIANTE: BOTONES PEQUEÑOS (opcional)
   ============================================= */
.btn-sm {
    padding: 8px 16px !important;
    font-size: 12px !important;
    gap: 8px !important;
}

.btn-sm svg {
    width: 16px !important;
    height: 16px !important;
}

/* =============================================
   VARIANTE: BOTONES LADO A LADO (horizontal)
   ============================================= */
.producto-acciones-horizontal {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.producto-acciones-horizontal .btn-agregar-carrito,
.producto-acciones-horizontal .btn-comprar-detalle {
    flex: 1;
}

/* =============================================
   VARIANTE: BOTONES CON SOLO ICONO
   ============================================= */
.btn-icon-only {
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 50% !important;
}

.btn-icon-only svg {
    margin: 0;
}

.btn-icon-only span {
    display: none;
}

/* =============================================
   EFECTO DE CARGA PARA EL BOTÓN
   ============================================= */
.btn-agregar-carrito.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-agregar-carrito.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =============================================
   7. INFO ADICIONAL (garantías)
   ============================================= */
.producto-info-adicional {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid #eee;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.info-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #e74c3c;
}

/* =============================================
   8. PRODUCTOS RELACIONADOS
   ============================================= */
.productos-relacionados {
    background: #f4f4f4;
    padding: 40px 0 60px;
    border-top: 3px solid #eee;
}

/* =============================================
   9. RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .producto-detalle-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .producto-detalle-imagen {
        min-height: 280px;
        padding: 36px 24px;
    }

    .imagen-principal {
        max-height: 280px;
    }
}

@media (max-width: 768px) {
    .producto-detalle-section {
        padding: 28px 0 40px;
    }

    .producto-detalle-info {
        padding: 24px 20px;
        gap: 16px;
    }

    .precio-grande-detalle {
        font-size: 30px;
    }

    .producto-detalle-titulo {
        font-size: 22px;
    }

    .badge-top-brand {
        width: 66px;
        height: 66px;
    }

    .descuento-banner-detalle .descuento-porcentaje {
        font-size: 18px;
        padding: 5px 14px;
    }

    /* Botones responsive */
    .producto-acciones .btn-agregar-carrito,
    .producto-acciones .btn-comprar-detalle,
    .producto-acciones .btn-consultar-detalle,
    .btn-agotado-detalle {
        padding: 10px 18px;
        font-size: 13px;
        gap: 8px;
    }
    
    .producto-acciones svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .breadcrumb .current {
        max-width: 160px;
    }

    .producto-detalle-imagen {
        padding: 24px 16px;
        min-height: 220px;
    }

    .imagen-principal {
        max-height: 220px;
    }

    .precio-grande-detalle {
        font-size: 26px;
    }

    /* Botones móvil */
    .producto-acciones {
        gap: 10px;
    }
    
    .producto-acciones .btn-agregar-carrito,
    .producto-acciones .btn-comprar-detalle,
    .producto-acciones .btn-consultar-detalle,
    .btn-agotado-detalle {
        padding: 9px 16px;
        font-size: 12px;
        border-radius: 10px;
    }
    
    .producto-acciones svg {
        width: 15px;
        height: 15px;
    }

    .producto-acciones-horizontal {
        flex-direction: column;
    }
}

/* =============================================
   10. ANIMACIONES ADICIONALES
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.producto-detalle-info {
    animation: fadeInUp 0.5s ease-out;
}

.producto-detalle-imagen {
    animation: fadeInUp 0.5s ease-out 0.1s both;
}