/* ==========================================================================
   1. SECCIÓN DE PRECIOS (ESCALADO CON CLAMP)
   ========================================================================== */

.ktrsd-product-price {
    /* SOLUCIÓN: Por defecto toma la fuente guardada, si es móvil se clamp-limita automáticamente */
    font-size: var(--ktrsd-price-size, 1.1rem) !important;
    font-weight: 700 !important;
    color: var(--ktrsd-primary) !important;
    font-family: var(--ktrsd-font-family, inherit) !important; 
    margin-top: auto !important;
}

@media (max-width: 580px) {
    .ktrsd-product-price {
        /* Tamaño del precio se auto-ajusta en móviles pequeños para evitar que quiebre */
        font-size: clamp(14px, var(--ktrsd-price-size, 18px), 16px) !important;
    }
}

.ktrsd-product-price del {
    font-size: 0.85rem !important;
    color: #94a3b8 !important;
    margin-right: 6px !important;
    font-weight: 400 !important;
}

.ktrsd-product-price ins {
    text-decoration: none !important;
}

/* ==========================================================================
   2. BOTONERA PREMIUM EN FILA (BOTONES COMPACTOS EN MÓVIL)
   ========================================================================== */

.ktrsd-card-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important; /* Espacio estrecho de 6px por defecto en celulares */
    margin-top: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    .ktrsd-card-actions {
        gap: 8px !important; /* Regresa a 8px en pantallas más grandes */
    }
}

/* Botón de Texto Principal (Columna Izquierda) */
.ktrsd-btn-custom {
    flex-grow: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--ktrsd-accent) !important;
    color: #ffffff !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    text-decoration: none !important;
    
    /* SOLUCIÓN: Altura móvil de 38px por defecto */
    height: 38px !important; 
    
    border-radius: calc(var(--ktrsd-radius) - 4px) !important;
    transition: background-color 0.2s ease, filter 0.2s ease, opacity 0.2s ease !important;
    border: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    .ktrsd-btn-custom {
        height: 42px !important; /* Altura estándar de 42px en tablets y computadoras */
    }
}

.ktrsd-btn-custom:hover {
    filter: brightness(0.9) !important;
}

/* Botón Desactivado (Sin Stock / No comprable) */
.ktrsd-btn-disabled {
    background-color: #f1f5f9 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
}

.ktrsd-btn-disabled:hover {
    filter: none !important;
}

/* Botón de Icono Secundario (Columna Derecha) */
.ktrsd-btn-custom-icon {
    flex-shrink: 0 !important;
    width: 38px !important; /* Ancho móvil */
    height: 38px !important; /* Alto móvil */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--ktrsd-accent) !important;
    color: #ffffff !important;
    border-radius: calc(var(--ktrsd-radius) - 4px) !important;
    transition: background-color 0.2s ease, filter 0.2s ease;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    .ktrsd-btn-custom-icon {
        width: 42px !important; /* Ancho estándar */
        height: 42px !important; /* Alto estándar */
    }
}

.ktrsd-btn-custom-icon:hover {
    filter: brightness(0.9) !important;
}

.ktrsd-btn-custom-icon svg {
    display: block !important;
    stroke: #ffffff !important;
}

/* ==========================================================================
   3. ESTADOS DE CARGA DE WOOCOMMERCE AJAX
   ========================================================================== */

.ktrsd-btn-custom.loading {
    opacity: 0.75 !important;
    cursor: wait !important;
}

.ktrsd-btn-custom.loading::after {
    content: "..." !important;
    margin-left: 4px !important;
    display: inline-block !important;
}

.ktrsd-card-actions .added_to_cart {
    display: none !important;
}