/**
 * CHECKOUT UPSELL ABOVE ORDER - ESTILOS
 * Layout horizontal compacto con ganchos de compra psicológicos
 * Colores dorados mantenidos, estructura similar a "Your order"
 */

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */
.theone-crp-container.theone-crp-above-order {
    background: linear-gradient(135deg, rgba(191, 137, 36, 0.05) 0%, rgba(191, 137, 36, 0.02) 100%);
    border: 2px solid rgba(191, 137, 36, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin: 0 0 24px 0;
    position: relative;
    overflow: hidden;
}

.theone-crp-container.theone-crp-above-order::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #BF8924, #E5B84F, #BF8924);
}

/* ============================================
   TRUST BADGES HEADER
   ============================================ */
.theone-crp-trust-header {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(191, 137, 36, 0.15);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.trust-badge i {
    color: #BF8924;
    font-size: 0.85rem;
}

/* ============================================
   HEADER DEL BLOQUE
   ============================================ */
.theone-crp-header {
    text-align: center;
    margin-bottom: 16px;
}

.theone-crp-title {
    color: #261C14;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.theone-crp-title .title-icon {
    font-size: 1.2rem;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.theone-crp-subtitle {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

/* ============================================
   LAYOUT EN 3 BLOQUES VERTICALES
   ============================================ */
.theone-crp-products.theone-crp-layout-horizontal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Tarjeta de Producto - 3 bloques verticales */
.theone-crp-product {
    background: white;
    border: 1px solid rgba(191, 137, 36, 0.15);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.theone-crp-product:hover {
    border-color: #BF8924;
    box-shadow: 0 4px 12px rgba(191, 137, 36, 0.15);
    transform: translateY(-2px);
}

.theone-crp-product.added-to-cart {
    background: linear-gradient(135deg, rgba(191, 137, 36, 0.08) 0%, rgba(191, 137, 36, 0.05) 100%);
    border-color: #BF8924;
}

.theone-crp-product.added-to-cart::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #BF8924;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ============================================
   BLOQUE 1: TÍTULO
   ============================================ */
.product-title-block {
    width: 100%;
    text-align: left;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(191, 137, 36, 0.1);
}

.theone-crp-product-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #261C14;
    margin: 0;
    line-height: 1.3;
}

/* ============================================
   BLOQUE 2: IMAGEN + PRECIO + BOTÓN (HORIZONTAL)
   ============================================ */
.product-main-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

/* Imagen pequeña (60x60px) */
.theone-crp-product-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}

.theone-crp-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.theone-crp-product:hover .theone-crp-product-image img {
    transform: scale(1.05);
}

/* Info de precio y stock */
.theone-crp-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Badge en esquina superior derecha */
.product-badge-corner {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
    z-index: 10;
}

.product-badge-corner.popular {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 100%);
}

.theone-crp-product-price {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #BF8924;
    flex-wrap: wrap;
}

.theone-crp-product-price del {
    color: #999;
    font-size: 0.75rem;
    margin-right: 2px;
}

/* Badge de ahorro */
.savings-badge {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
}

/* Stock con urgencia */
.theone-crp-product-stock {
    font-size: 0.65rem;
}

.theone-crp-product-stock .in-stock {
    color: #27ae60;
}

.theone-crp-product-stock .stock-urgency {
    color: #ff4757;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
}

.theone-crp-product-stock .stock-urgency i {
    animation: blink 1.5s ease-in-out infinite;
    font-size: 0.6rem;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================
   BLOQUE 3: PRUEBA SOCIAL
   ============================================ */
.product-social-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid rgba(191, 137, 36, 0.1);
}

/* Mini reseñas */
.theone-crp-mini-review {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
}

.theone-crp-mini-review .stars {
    color: #FFA500;
    font-size: 0.6rem;
}

.theone-crp-mini-review .review-count {
    color: #666;
    font-size: 0.65rem;
}

/* Contador de personas viendo */
.viewers-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    color: #666;
}

.viewers-mini i {
    color: #BF8924;
    font-size: 0.65rem;
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   BOTÓN DE ACCIÓN COMPACTO
   ============================================ */
.theone-crp-product-actions {
    flex-shrink: 0;
}

.theone-crp-add-btn {
    background: linear-gradient(135deg, #BF8924 0%, #9A6B1A 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.theone-crp-add-btn .btn-icon {
    font-size: 0.85rem;
    font-weight: bold;
}

/* Sobrescribir estilos del sistema WooCommerce */
.site-inner .woocommerce .theone-crp-add-btn,
.theone-crp-add-btn {
    color: white !important;
}

.site-inner .woocommerce .theone-crp-add-btn:hover:not(.added),
.theone-crp-add-btn:hover:not(.added) {
    background: linear-gradient(135deg, #E5B84F 0%, #BF8924 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(191, 137, 36, 0.4);
    border-color: #BF8924 !important;
    color: white !important;
}

.theone-crp-add-btn.added {
    background: #27ae60;
    cursor: default;
}

.theone-crp-add-btn.added .btn-icon {
    content: '✓';
}

.theone-crp-add-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.theone-crp-add-btn .btn-loader {
    font-size: 14px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   SOCIAL PROOF (Contador de personas)
   ============================================ */
.theone-crp-social-proof {
    text-align: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(191, 137, 36, 0.15);
}

.viewers-count {
    font-size: 0.75rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.viewers-count i {
    color: #BF8924;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.viewers-count strong {
    color: #BF8924;
}

/* ============================================
   NOTIFICACIONES
   ============================================ */
.theone-crp-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.theone-crp-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.theone-crp-notification-success {
    border-left: 4px solid #27ae60;
}

.theone-crp-notification-error {
    border-left: 4px solid #e74c3c;
}

.theone-crp-notification .notification-icon {
    font-size: 20px;
    font-weight: bold;
}

.theone-crp-notification-success .notification-icon {
    color: #27ae60;
}

.theone-crp-notification-error .notification-icon {
    color: #e74c3c;
}

.theone-crp-notification .notification-message {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .theone-crp-container.theone-crp-above-order {
        padding: 16px;
        margin: 0 0 16px 0;
    }

    .theone-crp-trust-header {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .theone-crp-title {
        font-size: 1rem;
    }

    .theone-crp-product-image {
        width: 50px;
        height: 50px;
    }

    .theone-crp-product-name {
        font-size: 0.8rem;
    }

    .theone-crp-add-btn {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
	.product-main-block{
		flex-direction: column;
	}
    .theone-crp-product {
        flex-wrap: wrap;
    }

    .theone-crp-product-actions {
        width: 100%;
    }

    .theone-crp-add-btn {
        width: 100%;
    }

    .theone-crp-trust-header {
        gap: 6px;
    }

    .trust-badge {
        font-size: 0.75rem;
    }

    .theone-crp-notification {
        top: 10px;
        right: 10px;
        left: 10px;
    }
}
@media (max-width: 375px){
    .product-main-block{
		flex-direction: column;
	}
}

/* ============================================
   OCULAR FOOTER ADICIONAL (del original)
   ============================================ */
[id="colophon"] .bg-area .bg-area-inner {
    display: none !important;
}
