/* WooCommerce Product Tooltips Styles - Premium Design */

.wc-product-tooltip {
    position: absolute;
    z-index: 9999;
    background: linear-gradient(145deg, #ffffff 0%, #fefefe 50%, #fcfcfc 100%);
    border: 1px solid rgba(212, 196, 168, 0.3);
    border-radius: 16px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(139, 69, 19, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 0;
    max-width: 380px;
    min-width: 320px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    backdrop-filter: blur(20px);
    transform: translateY(10px) scale(0.95);
    overflow: hidden;
}

.wc-product-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.wc-product-tooltip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #d2691e, #cd853f, #d2691e);
    border-radius: 16px 16px 0 0;
}

.wc-product-tooltip-content {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.wc-product-tooltip-image {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #f8f6f0 0%, #f5f3ed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.wc-product-tooltip-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(210, 105, 30, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(139, 69, 19, 0.03) 0%, transparent 50%);
}

.wc-product-tooltip-image img {
    max-width: 90px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.wc-product-tooltip:hover .wc-product-tooltip-image img {
    transform: scale(1.05);
}

.wc-product-tooltip-info {
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    position: relative;
}

.wc-product-tooltip-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 196, 168, 0.3), transparent);
}

.wc-product-tooltip-title {
    font-size: 17px;
    font-weight: 700;
    color: #5d4e37;
    margin: 0 0 10px 0;
    line-height: 1.3;
    text-decoration: none;
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wc-product-tooltip-price {
    font-size: 20px;
    font-weight: 800;
    color: #d2691e;
    margin: 0 0 14px 0;
    text-shadow: 0 1px 2px rgba(210, 105, 30, 0.1);
    position: relative;
}

.wc-product-tooltip-price::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #d2691e, #cd853f);
    border-radius: 1px;
}

.wc-product-tooltip-price .woocommerce-Price-amount {
    color: inherit;
}

.wc-product-tooltip-price del {
    font-size: 16px;
    color: #999;
    margin-right: 8px;
    opacity: 0.7;
}

.wc-product-tooltip-description {
    font-size: 14px;
    color: #6b5b4f;
    line-height: 1.5;
    margin: 0 0 18px 0;
    text-align: justify;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wc-product-tooltip-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d2691e 0%, #b8591a 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    box-shadow: 
        0 4px 12px rgba(210, 105, 30, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.wc-product-tooltip-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.wc-product-tooltip-button:hover {
    background: linear-gradient(135deg, #b8591a 0%, #a0522d 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(210, 105, 30, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.wc-product-tooltip-button:hover::before {
    left: 100%;
}

.wc-product-tooltip-button:active {
    transform: translateY(-1px);
}

.wc-product-tooltip-button::after {
    content: '→';
    margin-left: 8px;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.wc-product-tooltip-button:hover::after {
    transform: translateX(3px);
}

/* Flechas del tooltip - Mejoradas */
.wc-product-tooltip::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Flecha hacia abajo (tooltip arriba del link) */
.wc-product-tooltip.position-top::after {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #ffffff;
}

/* Flecha hacia arriba (tooltip abajo del link) */
.wc-product-tooltip.position-bottom::after {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #ffffff;
}

/* Flecha hacia la izquierda (tooltip a la derecha del link) */
.wc-product-tooltip.position-right::after {
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: #ffffff;
}

/* Flecha hacia la derecha (tooltip a la izquierda del link) */
.wc-product-tooltip.position-left::after {
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #ffffff;
}

/* Indicador de carga mejorado */
.wc-product-tooltip-loading {
    padding: 30px 20px;
    text-align: center;
    color: #8b4513;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    border-radius: 16px;
}

.wc-product-tooltip-loading::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(212, 196, 168, 0.3);
    border-top: 3px solid #d2691e;
    border-radius: 50%;
    animation: elegantSpin 1.2s linear infinite;
    margin-right: 12px;
    vertical-align: middle;
}

@keyframes elegantSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Efecto para los links de productos mejorado */
.post-content a[href*="/producto/"] {
    position: relative;
    color: #d2691e;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    text-decoration: none;
}

.post-content a[href*="/producto/"]::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #d2691e, #cd853f);
    transition: width 0.3s ease;
}

.post-content a[href*="/producto/"]:hover {
    color: #8b4513;
    text-decoration: none;
}

.post-content a[href*="/producto/"]:hover::after {
    width: 100%;
}

/* Badge de stock */
.wc-product-tooltip-stock {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(46, 125, 50, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.wc-product-tooltip-stock.out-of-stock {
    background: rgba(211, 47, 47, 0.9);
}

/* Responsivo mejorado */
@media (max-width: 768px) {
    .wc-product-tooltip {
        max-width: 300px;
        min-width: 280px;
        border-radius: 12px;
    }
    
    .wc-product-tooltip-image {
        height: 120px;
        border-radius: 12px 12px 0 0;
    }
    
    .wc-product-tooltip-image img {
        max-width: 80px;
        max-height: 100px;
    }
    
    .wc-product-tooltip-info {
        padding: 16px;
    }
    
    .wc-product-tooltip-title {
        font-size: 16px;
    }
    
    .wc-product-tooltip-price {
        font-size: 18px;
    }
    
    .wc-product-tooltip-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .wc-product-tooltip-button {
        padding: 10px 20px;
        font-size: 13px;
        border-radius: 8px;
    }
}

/* Animación de entrada suave */
@keyframes tooltipFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wc-product-tooltip.show {
    animation: tooltipFadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}