/**
 * Estilos personalizados para productos destacados
 * Selector de cantidad y botón en una sola línea
 */

/* --- Contenedor principal: todo en una fila --- */
.qty-and-add-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.3rem;
}

/* --- Selector de cantidad (grupo pequeño) --- */
.qty-selector-custom {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
}

/* --- Botones + y - (pequeños) --- */
.qty-btn-custom {
    background: #f0f0f0;
    border: none;
    color: #333;
    font-size: 1.2rem;
    font-weight: bold;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
    padding: 0;
    line-height: 1;
}
.qty-btn-custom:hover {
    background: #ddd;
}
.qty-btn-custom:active {
    background: #ccc;
}

/* --- Input de cantidad (pequeño) --- */
.qty-input-custom {
    width: 36px !important;
    height: 28px !important;
    text-align: center;
    border: none !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    border-radius: 0 !important;
    padding: 0 !important;
    font-size: 0.9rem;
    font-weight: bold;
    background: #fff;
    color: #333;
    -moz-appearance: textfield;
    min-width: 0;
}
.qty-input-custom::-webkit-outer-spin-button,
.qty-input-custom::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Botón Añadir al carrito (pequeño y compacto) --- */
.add-to-cart-custom {
    background-color: #1a6b3c !important;
    border-color: #1a6b3c !important;
    color: #fff !important;
    font-weight: bold;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    white-space: nowrap;
    flex-shrink: 0;
    height: 28px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.add-to-cart-custom:hover {
    background-color: #c0392b !important;
    border-color: #c0392b !important;
    color: #fff !important;
}
.add-to-cart-custom i {
    font-size: 0.9rem;
}

/* --- Quitar márgenes y paddings extra --- */
.product-actions-custom {
    margin-top: 0.2rem;
    padding: 0.2rem 0;
    width: 100%;
}
.add-to-cart-form-custom {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* --- Ajuste para móviles --- */
@media (max-width: 576px) {
    .qty-btn-custom {
        width: 22px;
        height: 22px;
        font-size: 1rem;
    }
    .qty-input-custom {
        width: 30px !important;
        height: 22px !important;
        font-size: 0.75rem;
    }
    .add-to-cart-custom {
        font-size: 0.65rem;
        height: 22px;
        padding: 0.1rem 0.4rem;
    }
    .qty-and-add-wrapper {
        gap: 0.3rem;
    }
}